mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
Conflicts: htdocs/compta/facture/class/facture-rec.class.php htdocs/fichinter/class/fichinterrec.class.php htdocs/fourn/class/fournisseur.commande.class.php htdocs/supplier_proposal/class/supplier_proposal.class.php
This commit is contained in:
commit
7b3ed7301d
|
|
@ -600,6 +600,7 @@ class Propal extends CommonObject
|
|||
// Clean vat code
|
||||
$reg = array();
|
||||
$vat_src_code = '';
|
||||
$reg = array();
|
||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
|
|
@ -771,7 +772,9 @@ class Propal extends CommonObject
|
|||
$qty = price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
|
|
|
|||
|
|
@ -3060,7 +3060,9 @@ class Commande extends CommonOrder
|
|||
$pu = price2num($pu);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
|
||||
|
|
|
|||
|
|
@ -853,7 +853,9 @@ class FactureRec extends CommonInvoice
|
|||
$qty = price2num($qty);
|
||||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
if (empty($txtva)) $txtva = 0;
|
||||
|
|
@ -1031,7 +1033,9 @@ class FactureRec extends CommonInvoice
|
|||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
if (empty($txlocaltax1)) $txlocaltax1 = 0;
|
||||
|
|
@ -1057,6 +1061,7 @@ class FactureRec extends CommonInvoice
|
|||
|
||||
// Clean vat code
|
||||
$vat_src_code = '';
|
||||
$reg = array();
|
||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
|
|
|
|||
|
|
@ -3283,7 +3283,9 @@ class Facture extends CommonInvoice
|
|||
$pu = price2num($pu);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
|
||||
|
|
|
|||
|
|
@ -1465,7 +1465,6 @@ class Contrat extends CommonObject
|
|||
$vat_src_code = $reg[1];
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
|
|
|
|||
|
|
@ -491,7 +491,9 @@ class FichinterRec extends Fichinter
|
|||
if (!$info_bits) $info_bits = 0;
|
||||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
|
||||
if ($price_base_type == 'HT') {
|
||||
$pu = $pu_ht;
|
||||
|
|
@ -499,7 +501,6 @@ class FichinterRec extends Fichinter
|
|||
$pu = $pu_ttc;
|
||||
}
|
||||
|
||||
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
|
|
|
|||
|
|
@ -2546,9 +2546,12 @@ class CommandeFournisseur extends CommonOrder
|
|||
|
||||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
if (!$qty) $qty = 1;
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
|
||||
|
|
|
|||
|
|
@ -416,10 +416,12 @@ class SupplierProposal extends CommonObject
|
|||
$qty = price2num($qty);
|
||||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
if ($price_base_type == 'HT')
|
||||
{
|
||||
$pu = $pu_ht;
|
||||
|
|
@ -673,7 +675,9 @@ class SupplierProposal extends CommonObject
|
|||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$txtva = price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user