Fix vat rate to show and not vat amount

This commit is contained in:
Laurent Destailleur 2017-08-29 19:55:49 +02:00
parent 044feab00f
commit 6c202c5fa1
3 changed files with 8 additions and 7 deletions

View File

@ -1491,23 +1491,23 @@ function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0)
{
$tmpresult='';
$tmpresult.=vatrate($object->lines[$i]->tva_tx,1,$object->lines[$i]->info_bits,1);
$tmpresult.=vatrate($object->lines[$i]->tva_tx, 1, $object->lines[$i]->info_bits, 1);
if (empty($conf->PDF_MAIN_HIDE_SECOND_TAX))
{
if ($object->lines[$i]->total_localtax1 != 0)
if ($object->lines[$i]->localtax1_tx != 0)
{
if (preg_replace('/[\s0%]/','',$tmpresult)) $tmpresult.='/';
else $tmpresult='';
$tmpresult.=vatrate(abs($object->lines[$i]->total_localtax1),1);
$tmpresult.=vatrate(abs($object->lines[$i]->localtax1_tx),1);
}
}
if (empty($conf->PDF_MAIN_HIDE_THIRD_TAX))
{
if ($object->lines[$i]->total_localtax2 != 0)
if ($object->lines[$i]->localtax2_tx != 0)
{
if (preg_replace('/[\s0%]/','',$tmpresult)) $tmpresult.='/';
else $tmpresult='';
$tmpresult.=vatrate(abs($object->lines[$i]->total_localtax2),1);
$tmpresult.=vatrate(abs($object->lines[$i]->localtax2_tx),1);
}
}

View File

@ -195,6 +195,7 @@ ErrorNoWarehouseDefined=Error, no warehouses defined.
ErrorBadLinkSourceSetButBadValueForRef=The link you use is not valid. A 'source' for payment is defined, but value for 'ref' is not valid.
ErrorTooManyErrorsProcessStopped=Too many errors. Process was stopped.
ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Only validated invoices can be sent using the "Send by email" mass action.
ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a predefined product or not
# Warnings
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.

View File

@ -657,8 +657,8 @@ Page=Page
Notes=Notes
AddNewLine=Add new line
AddFile=Add file
FreeZone=Free entry
FreeLineOfType=Free entry of type
FreeZone=Not a predefined product/service
FreeLineOfType=Not a predefined entry of type
CloneMainAttributes=Clone object with its main attributes
PDFMerge=PDF Merge
Merge=Merge