Update dolreceiptprinter.class.php

This commit is contained in:
Frédéric FRANCE 2021-12-21 10:05:06 +01:00 committed by GitHub
parent 520c296626
commit 214feeb1f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -674,9 +674,9 @@ class dolReceiptPrinter extends Printer
$vatarray[$line->tva_tx] += $line->total_tva;
}
foreach ($vatarray as $vatkey => $vatvalue) {
$spacestoadd = $nbcharactbyline - strlen($vatkey) - 12;
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
$this->printer->text($spaces.$vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n");
$spacestoadd = $nbcharactbyline - strlen($vatkey) - 12;
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
$this->printer->text($spaces.$vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n");
}
break;
case 'DOL_PRINT_OBJECT_TAX1':