diff --git a/htdocs/accountancy/class/html.formventilation.class.php b/htdocs/accountancy/class/html.formventilation.class.php index c4be176bf68..5ff125b0ba2 100644 --- a/htdocs/accountancy/class/html.formventilation.class.php +++ b/htdocs/accountancy/class/html.formventilation.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Olivier Geffroy - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2015 Ari Elbaz (elarifr) * * 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 ''; if (($action != 'editbarcodetype') && ! empty($user->rights->barcode->creer)) print ''; print '
'; print $langs->trans("BarcodeType"); - print ''; + print 'id.'">'.img_edit($langs->trans('Edit'),1).'
'; print ''; @@ -1388,7 +1392,7 @@ else print ''; print ''; if (($action != 'editbarcode') && ! empty($user->rights->barcode->creer)) print ''; print '
'; print $langs->trans("BarcodeValue"); - print ''; + print 'id.'">'.img_edit($langs->trans('Edit'),1).'
'; 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 '
'; + print $langs->trans("ProductAccountancySellCode"); + 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 '
'; + print $langs->trans("ProductAccountancyBuyCode"); + print '
'; + print ''; + print length_accountg($object->accountancy_code_buy); print ''; // Status (to sell)