mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 02:11:27 +01:00
Local Taxes: Works in Invoices.
Contracts: Patch to invoicing with the new invoices changes. Trad: Orders: Tab Compta.
This commit is contained in:
@@ -2487,14 +2487,16 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
|
||||
function get_localtax($tva, $local, $societe_acheteuse="")
|
||||
{
|
||||
global $db, $conf, $mysoc;
|
||||
|
||||
$code_pays=$mysoc->pays_code;
|
||||
|
||||
if (is_object($societe_acheteuse))
|
||||
{
|
||||
if ($code_pays!=$societe_acheteuse->pays_code) return 0;
|
||||
if ($local==1 && !$societe_acheteuse->localtax1_assuj) return 0;
|
||||
elseif ($local==2 && !$societe_acheteuse->localtax2_assuj) return 0;
|
||||
}
|
||||
|
||||
$code_pays=$mysoc->pays_code;
|
||||
|
||||
// Search local taxes
|
||||
$sql = "SELECT t.localtax1, t.localtax2";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
|
||||
|
||||
Reference in New Issue
Block a user