Merge pull request #36601 from ibuiv/patch-13
FIX Enhance VAT loading logic for supplier and buyer
This commit is contained in:
commit
852f5c66ad
1 changed files with 4 additions and 1 deletions
|
|
@ -104,7 +104,10 @@ if (in_array($object->element, array('propal', 'commande', 'facture', 'supplier_
|
|||
//print '<script>$(document).ready(function() { $(".clickvatforalllines").click(function() { jQuery(".classvatforalllines").toggle(); }); });</script>';
|
||||
if (GETPOST('mode', 'aZ09') == 'vatforalllines') {
|
||||
print '<div class="classvatforalllines inline-block nowraponall">';
|
||||
print $form->load_tva('vatforalllines', '', $mysoc, $object->thirdparty, 0, 0, '', false, 1);
|
||||
$societe_vendeuse = strpos($object->element, 'supplier') === false ? $mysoc : $object->thirdparty;
|
||||
$societe_acheteuse = strpos($object->element, 'supplier') === false ? $object->thirdparty : $mysoc;
|
||||
$vat_mode = strpos($object->element, 'supplier') === false ? 1 : 2;
|
||||
print $form->load_tva('vatforalllines', '', $societe_vendeuse, $societe_acheteuse, 0, 0, '', false, 1, $vat_mode);
|
||||
print '<input class="inline-block button smallpaddingimp" type="submit" name="submitforalllines" value="'.$langs->trans("Update").'">';
|
||||
print '</div>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue