23if (empty($conf) || !is_object($conf)) {
24 print
"Error, template page can't be called as URL";
30<!-- BEGIN PHP TEMPLATE STOCKCORRECTION.TPL.PHP -->
33if (
$object->element ==
'product') {
37$langs->load(
"productbatch");
48 $result = $pdluo->fetch($pdluoid);
50 $pdluoid = $pdluo->id;
58print
'<form action="'.$_SERVER[
"PHP_SELF"].
'?id='.$id.
'" method="post">'.
"\n";
62print
'<input type="hidden" name="token" value="'.newToken().
'">';
63print
'<input type="hidden" name="action" value="transfert_stock">';
64print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
66 print
'<input type="hidden" name="pdluoid" value="'.$pdluoid.
'">';
68print
'<table class="border centpercent">';
72if (
$object->element ==
'product') {
73 print
'<td class="fieldrequired">'.$langs->trans(
"WarehouseSource").
'</td>';
77 $warehousestatus =
'warehouseopen,warehouseinternal';
78 print $formproduct->selectWarehouses($selected,
'id_entrepot', $warehousestatus, 1, 0, 0,
'', 0, 0, array(),
'minwidth75 maxwidth300 widthcentpercentminusx');
81if (
$object->element ==
'stockmouvement') {
82 print
'<td class="fieldrequired">'.$langs->trans(
"Product").
'</td>';
85 $form->select_produits(
GETPOSTINT(
'product_id'),
'product_id', (!
getDolGlobalString(
'STOCK_SUPPORTS_SERVICES') ?
'0' :
''), 0, 0, -1, 2,
'', 0, null, 0, 1, 0,
'maxwidth500');
89print
'<td class="fieldrequired">'.$langs->trans(
"WarehouseTarget").
'</td><td>';
90print
img_picto(
'',
'stock').$formproduct->selectWarehouses(
GETPOST(
'id_entrepot_destination'),
'id_entrepot_destination',
'warehouseopen,warehouseinternal', 1, 0, 0,
'', 0, 0, array(),
'minwidth75 maxwidth300 widthcentpercentminusx');
92print
'<tr><td class="fieldrequired">'.$langs->trans(
"NumberOfUnit").
'</td><td colspan="3"><input type="text" name="nbpiece" class="center maxwidth75" value="'.
dol_escape_htmltag(
GETPOST(
"nbpiece")).
'"></td>';
96if (isModEnabled(
'productbatch') &&
98|| (
$object->element ==
'stockmouvement'))
101 print
'<td'.($object->element ==
'stockmouvement' ?
'' :
' class="fieldrequired"').
'>'.$langs->trans(
"batch_number").
'</td><td colspan="3">';
104 print
'<input type="text" name="batch_number_bis" size="40" disabled="disabled" value="'.(GETPOST(
'batch_number') ?
GETPOST(
'batch_number') : $pdluo->batch).
'">';
105 print
'<input type="hidden" name="batch_number" value="'.(GETPOST(
'batch_number') ?
GETPOST(
'batch_number') : $pdluo->batch).
'">';
107 print
img_picto(
'',
'barcode',
'class="pictofixedwidth"').
'<input type="text" name="batch_number" class="minwidth300 widthcentpercentminusx maxwidth300" value="'.(
GETPOST(
'batch_number') ?
GETPOST(
'batch_number') : $pdluo->batch).
'">';
114 print
'<td>'.$langs->trans(
"SellByDate").
'</td><td>';
115 print $form->selectDate((!empty($d_sellby) ? $d_sellby : $pdluo->sellby),
'sellby', 0, 0, 1,
"", 1, 0, ($pdluoid > 0 ? 1 : 0));
119 print
'<td>'.$langs->trans(
"EatByDate").
'</td><td>';
120 print $form->selectDate((!empty($d_eatby) ? $d_eatby : $pdluo->eatby),
'eatby', 0, 0, 1,
"", 1, 0, ($pdluoid > 0 ? 1 : 0));
127$valformovementlabel = (
GETPOST(
"label") ?
GETPOST(
"label") : $langs->trans(
"MovementTransferStock", $productref));
129print
'<td>'.$langs->trans(
"MovementLabel").
'</td>';
131print
'<input type="text" name="label" class="minwidth300" value="'.dol_escape_htmltag($valformovementlabel).
'">';
133print
'<td>'.$langs->trans(
"InventoryCode").
'</td>';
135print
'<input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(GETPOSTISSET(
"inventorycode") ?
GETPOST(
"inventorycode",
'alpha') :
dol_print_date(
dol_now(),
'%Y%m%d%H%M%S')).
'">';
143print
'<div class="center">';
144print
'<input type="submit" class="button button-save" value="'.dol_escape_htmltag($langs->trans(
"Save")).
'">';
145print
' ';
146print
'<input type="submit" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans(
"Cancel")).
'">';
151<!-- END PHP STOCKCORRECTION.TPL.PHP -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Manage record for batch number management.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_now($mode='auto')
Return date for now.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...