Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/accountancy/admin/account.php
	htdocs/core/class/html.formaccounting.class.php
	htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
	htdocs/langs/en_US/errors.lang
	htdocs/product/card.php
This commit is contained in:
Laurent Destailleur 2021-03-10 15:35:09 +01:00
commit 9ed128c6fa
7 changed files with 91 additions and 62 deletions

View File

@ -147,6 +147,7 @@ if (empty($reshook)) {
// and pass CCCNNNNN + (num of company * 100 000 000) as offset to the run_sql as a new parameter to say to update sql on the fly to add offset to rowid and account_parent value. // and pass CCCNNNNN + (num of company * 100 000 000) as offset to the run_sql as a new parameter to say to update sql on the fly to add offset to rowid and account_parent value.
// This is to be sure there is no conflict for each chart of account, whatever is country, whatever is company when multicompany is used. // This is to be sure there is no conflict for each chart of account, whatever is country, whatever is company when multicompany is used.
$tmp = file_get_contents($sqlfile); $tmp = file_get_contents($sqlfile);
$reg = array();
if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg)) { if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg)) {
$offsetforchartofaccount += $reg[1]; $offsetforchartofaccount += $reg[1];
} }
@ -342,7 +343,7 @@ if ($resql) {
// Box to select active chart of account // Box to select active chart of account
print $langs->trans("Selectchartofaccounts")." : "; print $langs->trans("Selectchartofaccounts")." : ";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">'; print '<select class="flat minwidth200" name="chartofaccounts" id="chartofaccounts">';
$sql = "SELECT a.rowid, a.pcg_version, a.label, a.active, c.code as country_code"; $sql = "SELECT a.rowid, a.pcg_version, a.label, a.active, c.code as country_code";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_system as a"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_system as a";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON a.fk_country = c.rowid AND c.active = 1"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON a.fk_country = c.rowid AND c.active = 1";
@ -353,6 +354,7 @@ if ($resql) {
if ($resqlchart) { if ($resqlchart) {
$numbis = $db->num_rows($resqlchart); $numbis = $db->num_rows($resqlchart);
$i = 0; $i = 0;
print '<option value="-1">&nbsp;</option>';
while ($i < $numbis) { while ($i < $numbis) {
$obj = $db->fetch_object($resqlchart); $obj = $db->fetch_object($resqlchart);

View File

@ -340,7 +340,7 @@ class FormAccounting extends Form
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache. * @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
* @return string String with HTML select * @return string String with HTML select
*/ */
public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss = 'maxwidth300 maxwidthonsmartphone', $usecache = '') public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss = 'minwidth100 maxwidth300 maxwidthonsmartphone', $usecache = '')
{ {
// phpcs:enable // phpcs:enable
global $conf, $langs; global $conf, $langs;
@ -378,6 +378,12 @@ class FormAccounting extends Form
return -1; return -1;
} }
$num_rows = $this->db->num_rows($resql);
if ($num_rows == 0) {
$langs->load("errors");
$showempty = $langs->trans("ErrorYouMustFirstSetupYourChartOfAccount");
} else {
$selected = $selectid; // selectid can be -1, 0, 123 $selected = $selectid; // selectid can be -1, 0, 123
while ($obj = $this->db->fetch_object($resql)) { while ($obj = $this->db->fetch_object($resql)) {
if (empty($obj->labelshort)) { if (empty($obj->labelshort)) {
@ -408,6 +414,8 @@ class FormAccounting extends Form
$options[$select_value_out] = $label; $options[$select_value_out] = $label;
} }
}
$this->db->free($resql); $this->db->free($resql);
if ($usecache) { if ($usecache) {
@ -416,7 +424,7 @@ class FormAccounting extends Form
} }
} }
$out .= Form::selectarray($htmlname, $options, $selected, ($showempty > 0 ? 1 : 0), 0, 0, '', 0, 0, 0, '', $morecss, 1); $out .= Form::selectarray($htmlname, $options, $selected, ($showempty ? (is_numeric($showempty) ? 1 : $showempty): 0), 0, 0, '', 0, 0, 0, '', $morecss, 1);
return $out; return $out;
} }

View File

@ -1550,13 +1550,18 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$this->cols['subprice'] = array( $this->cols['subprice'] = array(
'rank' => $rank, 'rank' => $rank,
'width' => 19, // in mm 'width' => 19, // in mm
'status' => true, 'status' => false,
'title' => array( 'title' => array(
'textkey' => 'PriceUHT' 'textkey' => 'PriceUHT'
), ),
'border-left' => true, // add left line separator 'border-left' => true, // add left line separator
); );
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE))
{
$this->cols['subprice']['status'] = true;
}
$rank = $rank + 10; $rank = $rank + 10;
$this->cols['qty'] = array( $this->cols['qty'] = array(
'rank' => $rank, 'rank' => $rank,
@ -1607,6 +1612,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders
'border-left' => true, // add left line separator 'border-left' => true, // add left line separator
); );
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN))
{
$this->cols['totalexcltax']['status'] = true;
}
// Add extrafields cols // Add extrafields cols
if (!empty($object->lines)) { if (!empty($object->lines)) {
$line = reset($object->lines); $line = reset($object->lines);

View File

@ -339,10 +339,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetDrawColor(128, 128, 128); $pdf->SetDrawColor(128, 128, 128);
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
$pdf->SetSubject($outputlangs->transnoentities("Order")); $pdf->SetSubject($outputlangs->transnoentities("PurchaseOrder"));
$pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetCreator("Dolibarr ".DOL_VERSION);
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PurchaseOrder")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) {
$pdf->SetCompression(false); $pdf->SetCompression(false);
} }
@ -526,16 +527,18 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
// VAT Rate // VAT Rate
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) {
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxtva, $curY); $pdf->SetXY($this->posxtva, $curY);
$pdf->MultiCell($this->posxup - $this->posxtva - 1, 3, $vat_rate, 0, 'R'); $pdf->MultiCell($this->posxup - $this->posxtva - 1, 3, $vat_rate, 0, 'R');
} }
// Unit price before discount // Unit price before discount
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE)) {
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxup, $curY); $pdf->SetXY($this->posxup, $curY);
$pdf->MultiCell($this->posxqty - $this->posxup - 0.8, 3, $up_excl_tax, 0, 'R', 0); $pdf->MultiCell($this->posxqty - $this->posxup - 0.8, 3, $up_excl_tax, 0, 'R', 0);
}
// Quantity // Quantity
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
@ -557,9 +560,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
} }
// Total HT line // Total HT line
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN)) {
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs); $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
$pdf->SetXY($this->postotalht, $curY); $pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
}
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) {

View File

@ -162,9 +162,12 @@ if (empty($reshook)) {
$description = trim(GETPOST('description', 'restricthtml')); $description = trim(GETPOST('description', 'restricthtml'));
// Check that leave is for a user inside the hierarchy or advanced permission for all is set // Check that leave is for a user inside the hierarchy or advanced permission for all is set
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->write)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->write))
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->id == $fuserid && empty($user->rights->holiday->write))
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->id != $fuserid && empty($user->rights->holiday->writeall_advance))
) {
$error++; $error++;
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors');
} else { } else {
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) {
if (!in_array($fuserid, $childids)) { if (!in_array($fuserid, $childids)) {

View File

@ -260,6 +260,7 @@ ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this oper
ErrorDateIsInFuture=Error, the date can't be in the future ErrorDateIsInFuture=Error, the date can't be in the future
ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory
ErrorAPercentIsRequired=Error, please fill in the percentage correctly ErrorAPercentIsRequired=Error, please fill in the percentage correctly
ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account
# Warnings # Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.

View File

@ -1333,7 +1333,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else { } else {
$accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT); $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT);
} }
print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, ''); print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>'; print '</td></tr>';
// Accountancy_code_sell_intra // Accountancy_code_sell_intra
@ -1345,7 +1345,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else { } else {
$accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT); $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT);
} }
print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, ''); print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>'; print '</td></tr>';
} }
@ -1357,7 +1357,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else { } else {
$accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT); $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT);
} }
print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, ''); print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>'; print '</td></tr>';
// Accountancy_code_buy // Accountancy_code_buy
@ -1368,7 +1368,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else { } else {
$accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT); $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT);
} }
print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, ''); print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>'; print '</td></tr>';
// Accountancy_code_buy_intra // Accountancy_code_buy_intra
@ -1380,7 +1380,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else { } else {
$accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT); $accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT);
} }
print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, ''); print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>'; print '</td></tr>';
} }
@ -1392,7 +1392,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else { } else {
$accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT); $accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT);
} }
print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, ''); print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>'; print '</td></tr>';
} else // For external software } else // For external software
{ {
@ -1509,7 +1509,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<table class="border allwidth">'; print '<table class="border allwidth">';
// Ref // Ref
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>'; print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>';
// Label // Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag($object->label).'"></td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag($object->label).'"></td></tr>';
@ -1746,21 +1746,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!empty($conf->accounting->enabled)) { if (!empty($conf->accounting->enabled)) {
// Accountancy_code_sell // Accountancy_code_sell
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td>'; print '<td>';
print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1); print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1);
print '</td></tr>'; print '</td></tr>';
// Accountancy_code_sell_intra // Accountancy_code_sell_intra
if ($mysoc->isInEEC()) { if ($mysoc->isInEEC()) {
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
print '<td>'; print '<td>';
print $formaccounting->select_account($object->accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, '', 1, 1); print $formaccounting->select_account($object->accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, '', 1, 1);
print '</td></tr>'; print '</td></tr>';
} }
// Accountancy_code_sell_export // Accountancy_code_sell_export
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellExportCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>';
print '<td>'; print '<td>';
print $formaccounting->select_account($object->accountancy_code_sell_export, 'accountancy_code_sell_export', 1, '', 1, 1); print $formaccounting->select_account($object->accountancy_code_sell_export, 'accountancy_code_sell_export', 1, '', 1, 1);
print '</td></tr>'; print '</td></tr>';
@ -1773,33 +1773,33 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Accountancy_code_buy_intra // Accountancy_code_buy_intra
if ($mysoc->isInEEC()) { if ($mysoc->isInEEC()) {
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>';
print '<td>'; print '<td>';
print $formaccounting->select_account($object->accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, '', 1, 1); print $formaccounting->select_account($object->accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, '', 1, 1);
print '</td></tr>'; print '</td></tr>';
} }
// Accountancy_code_buy_export // Accountancy_code_buy_export
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>';
print '<td>'; print '<td>';
print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1); print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1);
print '</td></tr>'; print '</td></tr>';
} else { } else {
// For external software // For external software
// Accountancy_code_sell // Accountancy_code_sell
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td><input name="accountancy_code_sell" class="maxwidth200" value="'.$object->accountancy_code_sell.'">'; print '<td><input name="accountancy_code_sell" class="maxwidth200" value="'.$object->accountancy_code_sell.'">';
print '</td></tr>'; print '</td></tr>';
// Accountancy_code_sell_intra // Accountancy_code_sell_intra
if ($mysoc->isInEEC()) { if ($mysoc->isInEEC()) {
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
print '<td><input name="accountancy_code_sell_intra" class="maxwidth200" value="'.$object->accountancy_code_sell_intra.'">'; print '<td><input name="accountancy_code_sell_intra" class="maxwidth200" value="'.$object->accountancy_code_sell_intra.'">';
print '</td></tr>'; print '</td></tr>';
} }
// Accountancy_code_sell_export // Accountancy_code_sell_export
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellExportCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>';
print '<td><input name="accountancy_code_sell_export" class="maxwidth200" value="'.$object->accountancy_code_sell_export.'">'; print '<td><input name="accountancy_code_sell_export" class="maxwidth200" value="'.$object->accountancy_code_sell_export.'">';
print '</td></tr>'; print '</td></tr>';
@ -1810,13 +1810,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Accountancy_code_buy_intra // Accountancy_code_buy_intra
if ($mysoc->isInEEC()) { if ($mysoc->isInEEC()) {
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>';
print '<td><input name="accountancy_code_buy_intra" class="maxwidth200" value="'.$object->accountancy_code_buy_intra.'">'; print '<td><input name="accountancy_code_buy_intra" class="maxwidth200" value="'.$object->accountancy_code_buy_intra.'">';
print '</td></tr>'; print '</td></tr>';
} }
// Accountancy_code_buy_export // Accountancy_code_buy_export
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>';
print '<td><input name="accountancy_code_buy_export" class="maxwidth200" value="'.$object->accountancy_code_buy_export.'">'; print '<td><input name="accountancy_code_buy_export" class="maxwidth200" value="'.$object->accountancy_code_buy_export.'">';
print '</td></tr>'; print '</td></tr>';
} }