*
* This program is free software; you can redistribute it and/or modify
@@ -126,7 +126,7 @@ class FormVentilation extends Form
if ($num) {
while ( $i < $num ) {
$obj = $this->db->fetch_object($resql);
- $label = $obj->account_number . ' - ' . $obj->label;
+ $label = length_accountg($obj->account_number) . ' - ' . $obj->label;
$label = dol_trunc($label, $trunclength);
if ($select_in == 0 ) $select_value_in = $obj->rowid;
if ($select_in == 1 ) $select_value_in = $obj->account_number;
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 80deacdea88..3fce17da770 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -186,12 +186,14 @@ if (empty($reshook))
$action = "create";
$error++;
}
+ /*
if (! empty(GETPOST('duration_value')) && empty(GETPOST('duration_unit')))
{
setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('Unit')), 'errors');
$action = "create";
$error++;
}
+ */
if (! $error)
{
@@ -263,7 +265,7 @@ if (empty($reshook))
if (GETPOST('accountancy_code_sell') <= 0) { $accountancy_code_sell = ''; } else { $accountancy_code_sell = GETPOST('accountancy_code_sell'); }
if (GETPOST('accountancy_code_buy') <= 0) { $accountancy_code_buy = ''; } else { $accountancy_code_buy = GETPOST('accountancy_code_buy'); }
$object->accountancy_code_sell = $accountancy_code_sell;
- $object->accountancy_code_buy = GETPOST('accountancy_code_buy');
+ $object->accountancy_code_buy = $accountancy_code_buy;
// MultiPrix
if (! empty($conf->global->PRODUIT_MULTIPRICES))
@@ -372,6 +374,8 @@ if (empty($reshook))
$object->barcode_type_coder = $stdobject->barcode_type_coder;
$object->barcode_type_label = $stdobject->barcode_type_label;
+ if (GETPOST('accountancy_code_sell') <= 0) { $accountancy_code_sell = ''; } else { $accountancy_code_sell = GETPOST('accountancy_code_sell'); }
+ if (GETPOST('accountancy_code_buy') <= 0) { $accountancy_code_buy = ''; } else { $accountancy_code_buy = GETPOST('accountancy_code_buy'); }
$object->accountancy_code_sell = GETPOST('accountancy_code_sell');
$object->accountancy_code_buy = GETPOST('accountancy_code_buy');
@@ -1367,7 +1371,7 @@ else
print '| ';
print '';
print ' | ';
@@ -1388,7 +1392,7 @@ else
print ' |
| ';
print '';
print ' | ';
@@ -1409,13 +1413,23 @@ else
}
// Accountancy sell code
- print ' |
| '.$form->editfieldkey("ProductAccountancySellCode",'accountancy_code_sell',$object->accountancy_code_sell,$object,$user->rights->produit->creer||$user->rights->service->creer,'string').' | ';
- print $form->editfieldval("ProductAccountancySellCode",'accountancy_code_sell',$object->accountancy_code_sell,$object,$user->rights->produit->creer||$user->rights->service->creer,'string');
+ print ' |
';
+ print '| ';
+ print $langs->trans("ProductAccountancySellCode");
+ print ' | ';
+ print ' ';
+ print ' | ';
+ print length_accountg($object->accountancy_code_sell);
print ' |
';
- // Accountancy buy code
- print '| '.$form->editfieldkey("ProductAccountancyBuyCode",'accountancy_code_buy',$object->accountancy_code_buy,$object,$user->rights->produit->creer||$user->rights->service->creer,'string').' | ';
- print $form->editfieldval("ProductAccountancyBuyCode",'accountancy_code_buy',$object->accountancy_code_buy,$object,$user->rights->produit->creer||$user->rights->service->creer,'string');
+ // Accountancy sell code
+ print ' |
';
+ print '| ';
+ print $langs->trans("ProductAccountancyBuyCode");
+ print ' | ';
+ print ' ';
+ print ' | ';
+ print length_accountg($object->accountancy_code_buy);
print ' |
';
// Status (to sell)