* Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * $object must be defined * $backtopage */ // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; } ?> element == 'product') { $productref = $object->ref; } $langs->load("productbatch"); if (empty($id)) { $id = $object->id; } $pdluoid = GETPOST('pdluoid', 'int'); $pdluo = new Productbatch($db); if ($pdluoid > 0) { $result = $pdluo->fetch($pdluoid); if ($result > 0) { $pdluoid = $pdluo->id; } else { dol_print_error($db, $pdluo->error, $pdluo->errors); } } print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic'); print '
'."\n"; print dol_get_fiche_head(); print ''; print ''; print ''; if ($pdluoid) { print ''; } print ''; // Source warehouse or product print ''; if ($object->element == 'product') { print ''; print ''; } if ($object->element == 'stock') { print ''; print ''; } print ''; print ''; print ''; // Serial / Eat-by date if (isModEnabled('productbatch') && (($object->element == 'product' && $object->hasbatch()) || ($object->element == 'stock')) ) { print ''; print 'element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; print ''; print ''; if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print ''; } if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { print ''; } print ''; } // Label $valformovementlabel = (GETPOST("label") ? GETPOST("label") : $langs->trans("MovementTransferStock", $productref)); print ''; print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans("WarehouseSource").''; print img_picto('', 'stock'); $selected = (GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))); $warehousestatus = 'warehouseopen,warehouseinternal'; print $formproduct->selectWarehouses($selected, 'id_entrepot', $warehousestatus, 1, 0, 0, '', 0, 0, array(), 'minwidth75 maxwidth300 widthcentpercentminusx'); print ''.$langs->trans("Product").''; print img_picto('', '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 img_picto('', 'stock').$formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth75 maxwidth300 widthcentpercentminusx'); print '
'.$langs->trans("NumberOfUnit").'
'; if ($pdluoid > 0) { // If form was opened for a specific pdluoid, field is disabled print ''; print ''; } else { print img_picto('', 'barcode', 'class="pictofixedwidth"').''; } print '
'.$langs->trans("SellByDate").''; print $form->selectDate((!empty($d_sellby) ? $d_sellby : $pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print ''.$langs->trans("EatByDate").''; print $form->selectDate((!empty($d_eatby) ? $d_eatby : $pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print '
'.$langs->trans("MovementLabel").''; print ''; print ''.$langs->trans("InventoryCode").''; print ''; print '
'; print dol_get_fiche_end(); print '
'; print ''; print '     '; print ''; print '
'; print '
'; ?>