Mercurial > repos > artbio > facturation_ibps
annotate facturation.py @ 0:32b0db39551c draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
| author | artbio |
|---|---|
| date | Mon, 22 Oct 2018 17:17:11 -0400 |
| parents | |
| children | 927553056183 |
| rev | line source |
|---|---|
|
0
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
1 # -*- coding: utf-8 -*- |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
2 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
3 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
4 import argparse |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
5 import re |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
6 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
7 import openpyxl |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
8 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
9 import pandas as pd |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
10 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
11 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
12 def Parser(): |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
13 the_parser = argparse.ArgumentParser() |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
14 the_parser.add_argument('--input', '-i', action='store', type=str, |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
15 help="input html code to convert to xlsx") |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
16 the_parser.add_argument('--output', '-o', action='store', type=str, |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
17 help='xlsx converted file') |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
18 args = the_parser.parse_args() |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
19 return args |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
20 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
21 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
22 def main(input_file, output_file): |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
23 """Script de parsing des fichiers de facturation de l'IBPS""" |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
24 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
25 # ouverture fichier input |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
26 with open(input_file, 'r') as file_object: |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
27 facture_html = file_object.read() |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
28 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
29 # parsing de la date et de la période de facturation |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
30 date = re.search(r'Paris le (.*?)</p>'.decode('utf-8'), |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
31 facture_html).group(1) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
32 periode = re.search(r'de la prestation (.*?)</p>'.decode('utf-8'), |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
33 facture_html).group(1) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
34 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
35 # parsing des tableaux html avec pandas |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
36 facture_parsed = pd.read_html( |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
37 facture_html, |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
38 thousands='', |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
39 decimal='.', |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
40 flavor='bs4') |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
41 # remove 'Adresse de l'appel à facturation : ' (\xa0:\xa0) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
42 adresse = facture_parsed[0].replace( |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
43 r"Adresse de l'appel \xe0 facturation\xa0:\xa0", r'', regex=True) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
44 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
45 # supression des symboles € (ça fait planter les calculs dans excel sinon) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
46 # ' € ' == \xa0\u20ac |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
47 elements = facture_parsed[1].replace(r"\xa0\u20ac", r'', regex=True) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
48 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
49 # conversion des noms de colonnes |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
50 elements_col = elements.iloc[0] |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
51 cout_col = elements_col.str.extract(r'(cout.*)', |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
52 expand=False).dropna().iloc[0] |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
53 elements = elements.rename(columns=elements_col).drop( |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
54 elements.index[0]) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
55 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
56 misc = facture_parsed[3] |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
57 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
58 ref = misc.iloc[:, # récupération de la référence |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
59 0].str.extract(r'sur le bon de commande :\s*(.*)$', |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
60 expand=False).dropna().iloc[0] |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
61 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
62 # ouverture fichier output |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
63 facture_output = openpyxl.load_workbook( |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
64 'template_facture.xlsx', data_only=False, keep_vba=False) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
65 ws = facture_output.worksheets[0] |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
66 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
67 # rajout de l'image de SU qui ne survit pas à la conversion |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
68 img = openpyxl.drawing.image.Image('template_SU.jpg') |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
69 img.anchor = "A1" |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
70 ws.add_image(img) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
71 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
72 # ajout des éléments facturés dans le tableau |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
73 element_row = 23 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
74 for i in range(len(elements)): |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
75 element_row += 1 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
76 ws.cell(row=element_row, column=1, value=elements.iloc[i][u'Objet']) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
77 ws.cell( |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
78 row=element_row, |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
79 column=2, |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
80 value=elements.iloc[i][u'nombre(s)']) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
81 ws.cell( |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
82 row=element_row, |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
83 column=4, |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
84 value=elements.iloc[i][cout_col]) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
85 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
86 # ajout de l'adresse |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
87 address_row = 7 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
88 for i in range(len(adresse)): |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
89 address_row += 1 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
90 ws.cell(row=address_row, column=3, |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
91 value=adresse.iloc[i, 0].encode('utf-8')) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
92 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
93 # ajout de la référence/période/date |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
94 ws.cell(row=2, column=3, value=ref.encode('utf-8')) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
95 ws.cell(row=5, column=5, value=periode.encode('utf-8')) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
96 ws.cell(row=21, column=5, value=date.encode('utf-8')) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
97 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
98 # export fichier output |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
99 facture_output.save(output_file) |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
100 return |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
101 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
102 |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
103 if __name__ == '__main__': |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
104 args = Parser() |
|
32b0db39551c
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 0099dbb7178a8b187c1904f92871bce033070c58
artbio
parents:
diff
changeset
|
105 main(args.input, args.output) |
