diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php index 401e97e1de4..b64e4cef48f 100644 --- a/htdocs/core/lib/functionsnumtoword.lib.php +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -56,7 +56,6 @@ function dol_convertToWord($num, $langs, $currency = false, $centimes = false) $concatWords = $langs->getLabelFromNumber($num, $type); return $concatWords; } else { - $TNum = explode('.', $num); $num = (int) $TNum[0]; $words = array(); diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 1f24e44a266..22d92d4211f 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -29,16 +29,15 @@ if (empty($conf) || !is_object($conf)) { element == 'product') $productref = $object->ref; - $productref = ''; - if ($object->element == 'product') $productref = $object->ref; - - $langs->load("productbatch"); +$langs->load("productbatch"); - if (empty($id)) $id = $object->id; +if (empty($id)) $id = $object->id; - print ''; - print load_fiche_titre($langs->trans("StockCorrection"), '', 'generic'); +print load_fiche_titre($langs->trans("StockCorrection"), '', 'generic'); - print '
'."\n"; +print ''."\n"; - dol_fiche_head(); +dol_fiche_head(); - print ''; - print ''; - print ''; - print ''; +print ''; +print ''; +print ''; +print '
'; - // Warehouse or product - print ''; - if ($object->element == 'product') - { - print ''; - print ''; - } - if ($object->element == 'stock') - { - print ''; - print ''; - } - print ''; - print ''; - print ''; +// Warehouse or product +print ''; +if ($object->element == 'product') { + print ''; + print ''; +} +if ($object->element == 'stock') { + print ''; + print ''; +} +print ''; +print ''; +print ''; - // Serial / Eat-by date - if (!empty($conf->productbatch->enabled) && - (($object->element == 'product' && $object->hasbatch()) - || ($object->element == 'stock')) - ) - { - print ''; - print 'element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; - print ''; - print ''; - print ''; - print ''; - print ''; - } +// Serial / Eat-by date +if (!empty($conf->productbatch->enabled) && +(($object->element == 'product' && $object->hasbatch()) +|| ($object->element == 'stock')) +) +{ + print ''; + print 'element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; + print ''; + print ''; + print ''; + print ''; + print ''; +} - // Purchase price and project - print ''; - print ''; - print ''; - if (!empty($conf->projet->enabled)) - { - print ''; - print ''; - } - print ''; +// Purchase price and project +print ''; +print ''; +print ''; +if (!empty($conf->projet->enabled)) +{ + print ''; + print ''; +} +print ''; - // Label of mouvement of id of inventory - $valformovementlabel = ((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock", ''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref)); - print ''; - print ''; - print ''; - print ''; - print ''; +// Label of mouvement of id of inventory +$valformovementlabel = ((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock", ''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref)); +print ''; +print ''; +print ''; +print ''; +print ''; - print '
'.$langs->trans("Warehouse").''; - print $formproduct->selectWarehouses((GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); - print '   '; - print ''.$langs->trans("Product").''; - $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES) ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); - print '   '; - print ''.$langs->trans("NumberOfUnit").'
'.$langs->trans("Warehouse").''; + print $formproduct->selectWarehouses((GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); + print '   '; + print ''.$langs->trans("Product").''; + $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES) ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); + print '   '; + print ''.$langs->trans("NumberOfUnit").'
'; - print ''; - print '
'.$langs->trans("EatByDate").''; - $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); - print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); - print ''.$langs->trans("SellByDate").''; - $sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); - print $form->selectDate($sellbyselected, 'sellby', '', '', 1, ""); - print '
'; + print ''; + print '
'.$langs->trans("EatByDate").''; + $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); + print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); + print ''.$langs->trans("SellByDate").''; + $sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); + print $form->selectDate($sellbyselected, 'sellby', '', '', 1, ""); + print '
'.$langs->trans("UnitPurchaseValue").''.$langs->trans('Project').''; - $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); - print '
'.$langs->trans("UnitPurchaseValue").''.$langs->trans('Project').''; + $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); + print '
'.$langs->trans("MovementLabel").''; - print ''; - print ''.$langs->trans("InventoryCode").'
'.$langs->trans("MovementLabel").''; +print ''; +print ''.$langs->trans("InventoryCode").'
'; +print ''; - dol_fiche_end(); +dol_fiche_end(); - print '
'; - print ''; - print '     '; - print ''; - print '
'; +print '
'; +print ''; +print '     '; +print ''; +print '
'; - print '
'; +print ''; ?> diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index dffd18e0176..9bea4a65070 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -29,16 +29,16 @@ if (empty($conf) || !is_object($conf)) { element == 'product') $productref = $object->ref; +$productref = ''; +if ($object->element == 'product') $productref = $object->ref; - $langs->load("productbatch"); +$langs->load("productbatch"); - if (empty($id)) $id = $object->id; +if (empty($id)) $id = $object->id; - $pdluoid = GETPOST('pdluoid', 'int'); +$pdluoid = GETPOST('pdluoid', 'int'); - $pdluo = new Productbatch($db); +$pdluo = new Productbatch($db); if ($pdluoid > 0) { @@ -53,49 +53,47 @@ if ($pdluoid > 0) } } - print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic'); +print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic'); - print '
'."\n"; +print ''."\n"; - dol_fiche_head(); +dol_fiche_head(); - print ''; - print ''; - print ''; +print ''; +print ''; +print ''; if ($pdluoid) { print ''; } - print ''; +print '
'; - // Source warehouse or product - print ''; -if ($object->element == 'product') -{ +// Source warehouse or product +print ''; +if ($object->element == 'product') { print ''; print ''; } -if ($object->element == 'stock') -{ +if ($object->element == 'stock') { print ''; print ''; } - print ''; - print ''; - print ''; +print ''; +print ''; +print ''; - // Serial / Eat-by date +// Serial / Eat-by date if (!empty($conf->productbatch->enabled) && - (($object->element == 'product' && $object->hasbatch()) - || ($object->element == 'stock')) - ) +(($object->element == 'product' && $object->hasbatch()) +|| ($object->element == 'stock')) +) { print ''; print 'element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; } - // Label - $valformovementlabel = (GETPOST("label") ?GETPOST("label") : $langs->trans("MovementTransferStock", $productref)); - print ''; - print ''; - print ''; - print ''; - print ''; +// Label +$valformovementlabel = (GETPOST("label") ?GETPOST("label") : $langs->trans("MovementTransferStock", $productref)); +print ''; +print ''; +print ''; +print ''; +print ''; - print '
'.$langs->trans("WarehouseSource").''; print $formproduct->selectWarehouses((GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1); print ''.$langs->trans("Product").''; $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES) ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); print ''.$langs->trans("WarehouseTarget").''; - print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1); - print '
'.$langs->trans("NumberOfUnit").'
'.$langs->trans("WarehouseTarget").''; +print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1); +print '
'.$langs->trans("NumberOfUnit").'
'; @@ -122,26 +120,26 @@ if (!empty($conf->productbatch->enabled) && print '
'.$langs->trans("MovementLabel").''; - print ''; - print ''.$langs->trans("InventoryCode").'
'.$langs->trans("MovementLabel").''; +print ''; +print ''.$langs->trans("InventoryCode").'
'; +print ''; - dol_fiche_end(); +dol_fiche_end(); - print '
'; - print ''; - print '     '; - print ''; - print '
'; +print '
'; +print ''; +print '     '; +print ''; +print '
'; - print '
'; +print ''; ?>