forked from Wavyzz/dolibarr
Fix default value for inventory code during a stock correction
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $object must be defined
|
||||
* $backtopage
|
||||
* $backtopage
|
||||
*/
|
||||
?>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post">'."\n";
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="correct_stock">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
@@ -93,12 +93,12 @@
|
||||
print '<td>'.$langs->trans('Project').'</td>';
|
||||
print '<td>';
|
||||
$formproject->select_projects();
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Serial / Eat-by date
|
||||
if (! empty($conf->productbatch->enabled) &&
|
||||
if (! empty($conf->productbatch->enabled) &&
|
||||
(($object->element == 'product' && $object->hasbatch())
|
||||
|| ($object->element == 'stock'))
|
||||
)
|
||||
@@ -127,19 +127,19 @@
|
||||
print '<td>';
|
||||
print '<input type="text" name="label" size="60" value="'.$valformovementlabel.'">';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("InventoryCode").'</td><td><input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.GETPOST("inventorycode").'"></td>';
|
||||
print '<td>'.$langs->trans("InventoryCode").'</td><td><input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(isset($_POST["inventorycode"])?GETPOST("inventorycode",'alpha'):dol_print_date(dol_now(),'%y%m%d%H%M%S')).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.dol_escape_htmltag($langs->trans('Save')).'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
?>
|
||||
<!-- END PHP STOCKCORRECTION.TPL.PHP -->
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
if ($object->element == 'product') $productref = $object->ref;
|
||||
|
||||
$langs->load("productbatch");
|
||||
|
||||
|
||||
if (empty($id)) $id = $object->id;
|
||||
|
||||
|
||||
$pdluoid=GETPOST('pdluoid','int');
|
||||
|
||||
$pdluo = new Productbatch($db);
|
||||
@@ -48,9 +48,9 @@
|
||||
print load_fiche_titre($langs->trans("StockTransfer"),'','title_generic.png');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post">'."\n";
|
||||
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="transfert_stock">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
@@ -76,7 +76,7 @@
|
||||
print $form->select_produits(GETPOST('product_id'),'product_id',(empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''));
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
print '<td width="20%" class="fieldrequired">'.$langs->trans("WarehouseTarget").'</td><td width="30%">';
|
||||
print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1);
|
||||
print '</td></tr>';
|
||||
@@ -84,7 +84,7 @@
|
||||
print '</tr>';
|
||||
|
||||
// Serial / Eat-by date
|
||||
if (! empty($conf->productbatch->enabled) &&
|
||||
if (! empty($conf->productbatch->enabled) &&
|
||||
(($object->element == 'product' && $object->hasbatch())
|
||||
|| ($object->element == 'stock'))
|
||||
)
|
||||
@@ -103,7 +103,7 @@
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("EatByDate").'</td><td>';
|
||||
print $form->select_date(($d_eatby?$d_eatby:$pdluo->eatby),'eatby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
|
||||
@@ -121,13 +121,13 @@
|
||||
print '<td>';
|
||||
print '<input type="text" name="label" size="60" value="'.dol_escape_htmltag($valformovementlabel).'">';
|
||||
print '</td>';
|
||||
print '<td width="15%">'.$langs->trans("InventoryCode").'</td><td><input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(GETPOST("inventorycode")?GETPOST("inventorycode",'alpha'):dol_print_date(dol_now(),'%y%m%d%H%M%S')).'"></td>';
|
||||
print '<td width="15%">'.$langs->trans("InventoryCode").'</td><td><input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(isset($_POST["inventorycode"])?GETPOST("inventorycode",'alpha'):dol_print_date(dol_now(),'%y%m%d%H%M%S')).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Save')).'">';
|
||||
print ' ';
|
||||
|
||||
Reference in New Issue
Block a user