Merge remote-tracking branch 'upstream/3.9' into 3.9
This commit is contained in:
commit
600a10fa16
@ -387,8 +387,8 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
$newinvoiceline=$this->lines[$i];
|
$newinvoiceline=$this->lines[$i];
|
||||||
$newinvoiceline->fk_facture=$this->id;
|
$newinvoiceline->fk_facture=$this->id;
|
||||||
$newinvoiceline->origin = $this->element;
|
$newinvoiceline->origin = $this->element; // TODO This seems not used. Here we but origin 'facture' but after
|
||||||
$newinvoiceline->origin_id = $this->lines[$i]->id;
|
$newinvoiceline->origin_id = $this->lines[$i]->id; // we put an id of object !
|
||||||
if ($result >= 0 && ($newinvoiceline->info_bits & 0x01) == 0) // We keep only lines with first bit = 0
|
if ($result >= 0 && ($newinvoiceline->info_bits & 0x01) == 0) // We keep only lines with first bit = 0
|
||||||
{
|
{
|
||||||
// Reset fk_parent_line for no child products and special product
|
// Reset fk_parent_line for no child products and special product
|
||||||
|
|||||||
@ -112,8 +112,12 @@ if ($action == "correct_stock")
|
|||||||
if ($product->hasbatch())
|
if ($product->hasbatch())
|
||||||
{
|
{
|
||||||
$batch=GETPOST('batch_number');
|
$batch=GETPOST('batch_number');
|
||||||
$eatby=GETPOST('eatby');
|
|
||||||
$sellby=GETPOST('sellby');
|
//$eatby=GETPOST('eatby');
|
||||||
|
//$sellby=GETPOST('sellby');
|
||||||
|
$eatby=dol_mktime(12, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
|
||||||
|
$sellby=dol_mktime(12, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
|
||||||
|
|
||||||
$result=$product->correct_stock_batch(
|
$result=$product->correct_stock_batch(
|
||||||
$user,
|
$user,
|
||||||
$id,
|
$id,
|
||||||
|
|||||||
@ -63,13 +63,13 @@
|
|||||||
{
|
{
|
||||||
print '<td width="20%" class="fieldrequired" colspan="2">'.$langs->trans("Product").'</td>';
|
print '<td width="20%" class="fieldrequired" colspan="2">'.$langs->trans("Product").'</td>';
|
||||||
print '<td width="20%">';
|
print '<td width="20%">';
|
||||||
print $form->select_produits(GETPOST('product_id'),'product_id',(empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''));
|
print $form->select_produits(GETPOST('product_id'),'product_id',(empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''),20,0,-1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td width="20%">';
|
print '<td width="20%">';
|
||||||
print '<select name="mouvement" id="mouvement" class="flat">';
|
print '<select name="mouvement" id="mouvement" class="flat">';
|
||||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||||
print '<option value="1">'.$langs->trans("Delete").'</option>';
|
print '<option value="1"'.(GETPOST('mouvement')?' selected="selected"':'').'>'.$langs->trans("Delete").'</option>';
|
||||||
print '</select></td>';
|
print '</select></td>';
|
||||||
print '<td width="20%" class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td><td width="20%"><input class="flat" name="nbpiece" id="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>';
|
print '<td width="20%" class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td><td width="20%"><input class="flat" name="nbpiece" id="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user