# HG changeset patch # User artbio # Date 1547137193 18000 # Node ID b8460b9f425354e58ac7ae6ce6137e7db03b098e # Parent 674eae0b423fd39d3d9a945235c4fcc5973da743 planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/facturation_ibps commit 55ddb8704457ef6616412bfae382c36191aeab8a-dirty diff -r 674eae0b423f -r b8460b9f4253 facturation.py --- a/facturation.py Wed Jan 09 18:00:33 2019 -0500 +++ b/facturation.py Thu Jan 10 11:19:53 2019 -0500 @@ -17,11 +17,13 @@ help='xlsx converted file') the_parser.add_argument('--template', '-t', action='store', type=str, help='xlsx template file') + the_parser.add_argument('--reduction', '-r', action='store', type=float, + help='reduction to apply', default=1.0) args = the_parser.parse_args() return args -def main(template, input_file, output_file): +def main(template, input_file, output_file, reduction): """Script de parsing des fichiers de facturation de l'IBPS""" # ouverture fichier input @@ -86,7 +88,8 @@ ws.cell( row=element_row, column=4, - value=elements.iloc[i][cout_col]).number_format = '0.00' + value=((1-reduction) * + elements.iloc[i][cout_col])).number_format = '0.00' # ajout de l'adresse address_row = 7 @@ -107,4 +110,4 @@ if __name__ == '__main__': args = Parser() - main(args.template, args.input, args.output) + main(args.template, args.input, args.output, args.reduction) diff -r 674eae0b423f -r b8460b9f4253 facturation.xml --- a/facturation.xml Wed Jan 09 18:00:33 2019 -0500 +++ b/facturation.xml Thu Jan 10 11:19:53 2019 -0500 @@ -1,4 +1,4 @@ - + beautifulsoup4 @@ -11,15 +11,19 @@ cp $__tool_directory__/template_* . && python $__tool_directory__/facturation.py -t $__tool_directory__/"$template" + -r $reduction -i $input -o $output ]]> - - - - + + + + + @@ -39,8 +43,14 @@ + + + + + + - + .. class:: infomark @@ -49,7 +59,7 @@ Génère un fichier Excel de facturation à partir du fichier html du système actuel de l'IBPS. - - + + diff -r 674eae0b423f -r b8460b9f4253 test-data/testfacture_electronique_reduc.xlsx Binary file test-data/testfacture_electronique_reduc.xlsx has changed