Skip to content
Snippets Groups Projects
Commit 824a0adb authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Add custom code and origin country into invoice

parent d79adf60
No related branches found
No related tags found
No related merge requests found
...@@ -870,8 +870,17 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $ ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment