mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-22 17:31:25 +01:00
New: Add custom code and origin country into invoice
This commit is contained in:
@@ -870,8 +870,17 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $
|
|||||||
}
|
}
|
||||||
|
|
||||||
$desc = $prod->description;
|
$desc = $prod->description;
|
||||||
$desc.= $prod->description && $_POST['np_desc'] ? "\n" : "";
|
$desc.= ($prod->description && $_POST['np_desc']) ? "\n" : "";
|
||||||
$desc.= $_POST['np_desc'];
|
$desc.= $_POST['np_desc'];
|
||||||
|
if (! empty($prod->customcode) || ! empty($prod->country_code))
|
||||||
|
{
|
||||||
|
$tmptxt='(';
|
||||||
|
if (! empty($prod->customcode)) $tmptxt.=$langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode;
|
||||||
|
if (! empty($prod->customcode) && ! empty($prod->country_code)) $tmptxt.=' - ';
|
||||||
|
if (! empty($prod->country_code)) $tmptxt.=$langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code,0,$db,$langs,0);
|
||||||
|
$tmptxt.=')';
|
||||||
|
$desc.="\n".$tmptxt;
|
||||||
|
}
|
||||||
$type = $prod->type;
|
$type = $prod->type;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user