New: A default label is suggested for stock correction and transfer
instead of empty string.
This commit is contained in:
parent
179cbbd187
commit
689354f927
@ -8,6 +8,7 @@ For users:
|
|||||||
- New: Add check list from table for extrafield type
|
- New: Add check list from table for extrafield type
|
||||||
- New: Use new combobox.
|
- New: Use new combobox.
|
||||||
- New: Add hidden option MAXTABS_IN_CARD.
|
- New: Add hidden option MAXTABS_IN_CARD.
|
||||||
|
- New: A default label is suggested for stock correction and transfer instead of empty string.
|
||||||
- Fix / Improve : [ bug #1747 ] Remove creation of batch 'Undefined'
|
- Fix / Improve : [ bug #1747 ] Remove creation of batch 'Undefined'
|
||||||
- Add Weighted average price as default price for buying price for margin calculation. Add option
|
- Add Weighted average price as default price for buying price for margin calculation. Add option
|
||||||
MARGIN_PMP_AS_DEFAULT_BUY_PRICE to replace with first supplier price.
|
MARGIN_PMP_AS_DEFAULT_BUY_PRICE to replace with first supplier price.
|
||||||
|
|||||||
@ -125,6 +125,8 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service in
|
|||||||
StockMustBeEnoughForOrder=Stock level must be enough to add product/service into order
|
StockMustBeEnoughForOrder=Stock level must be enough to add product/service into order
|
||||||
StockMustBeEnoughForShipment= Stock level must be enough to add product/service into shipment
|
StockMustBeEnoughForShipment= Stock level must be enough to add product/service into shipment
|
||||||
MovementLabel=Label of movement
|
MovementLabel=Label of movement
|
||||||
InventoryCode=Inventory code
|
InventoryCode=Movement or inventory code
|
||||||
IsInPackage=Contained into package
|
IsInPackage=Contained into package
|
||||||
ShowWarehouse=Show warehouse
|
ShowWarehouse=Show warehouse
|
||||||
|
MovementCorrectStock=Stock content correction for product %s
|
||||||
|
MovementTransferStock=Stock transfer of product %s into another warehouse
|
||||||
|
|||||||
@ -430,13 +430,13 @@ if ($resql)
|
|||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
//print_liste_field_titre($langs->trans("Id"),$_SERVER["PHP_SELF"], "m.rowid","",$param,"",$sortfield,$sortorder);
|
//print_liste_field_titre($langs->trans("Id"),$_SERVER["PHP_SELF"], "m.rowid","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"], "m.datem","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"], "m.datem","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("LabelMovement"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("InventoryCode"),$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("ProductRef"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("ProductRef"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("ProductLabel"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("ProductLabel"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Warehouse"),$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
print_liste_field_titre($langs->trans("Warehouse"),$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
||||||
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("InventoryCode"),$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("LabelMovement"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Units"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Units"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -451,18 +451,6 @@ if ($resql)
|
|||||||
$syear = GETPOST('year')?GETPOST('year'):-1;
|
$syear = GETPOST('year')?GETPOST('year'):-1;
|
||||||
$formother->select_year($syear,'year',1, 20, 5);
|
$formother->select_year($syear,'year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Label of movement
|
|
||||||
print '<td class="liste_titre" align="left">';
|
|
||||||
print '<input class="flat" type="text" size="10" name="search_movement" value="'.$search_movement.'">';
|
|
||||||
print '</td>';
|
|
||||||
// Inventory code
|
|
||||||
print '<td class="liste_titre" align="left">';
|
|
||||||
print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.$search_inventorycode.'">';
|
|
||||||
print '</td>';
|
|
||||||
// Origin of movement
|
|
||||||
print '<td class="liste_titre" align="left">';
|
|
||||||
print ' ';
|
|
||||||
print '</td>';
|
|
||||||
// Product Ref
|
// Product Ref
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" size="6" name="search_product_ref" value="'.($idproduct?$product->ref:$search_product_ref).'">';
|
print '<input class="flat" type="text" size="6" name="search_product_ref" value="'.($idproduct?$product->ref:$search_product_ref).'">';
|
||||||
@ -471,12 +459,27 @@ if ($resql)
|
|||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" size="10" name="search_product" value="'.($idproduct?$product->libelle:$search_product).'">';
|
print '<input class="flat" type="text" size="10" name="search_product" value="'.($idproduct?$product->libelle:$search_product).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
// Warehouse
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
if (empty($idproduct) || $idproduct < 0) print '<input class="flat" type="text" size="10" name="search_warehouse" value="'.($search_warehouse).'">'; // We are on a specific warehouse card, no filter on other should be possible
|
print '<input class="flat" type="text" size="10" name="search_warehouse" value="'.($search_warehouse).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
// Author
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" size="6" name="search_user" value="'.($search_user).'">';
|
print '<input class="flat" type="text" size="6" name="search_user" value="'.($search_user).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
// Inventory code
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.$search_inventorycode.'">';
|
||||||
|
print '</td>';
|
||||||
|
// Label of movement
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print '<input class="flat" type="text" size="10" name="search_movement" value="'.$search_movement.'">';
|
||||||
|
print '</td>';
|
||||||
|
// Origin of movement
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print ' ';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
@ -504,12 +507,6 @@ if ($resql)
|
|||||||
//print '<td>'.$objp->mid.'</td>'; // This is primary not movement id
|
//print '<td>'.$objp->mid.'</td>'; // This is primary not movement id
|
||||||
// Date
|
// Date
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->datem),'dayhour').'</td>';
|
print '<td>'.dol_print_date($db->jdate($objp->datem),'dayhour').'</td>';
|
||||||
// Label of movement
|
|
||||||
print '<td>'.$objp->label.'</td>';
|
|
||||||
// Inventory code
|
|
||||||
print '<td>'.$objp->inventorycode.'</td>';
|
|
||||||
// Origin of movement
|
|
||||||
print '<td>'.$origin.'</td>';
|
|
||||||
// Product ref
|
// Product ref
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$productstatic->id=$objp->rowid;
|
$productstatic->id=$objp->rowid;
|
||||||
@ -538,6 +535,12 @@ if ($resql)
|
|||||||
$userstatic->lastname=$objp->login;
|
$userstatic->lastname=$objp->login;
|
||||||
print $userstatic->getNomUrl(1);
|
print $userstatic->getNomUrl(1);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
// Inventory code
|
||||||
|
print '<td>'.$objp->inventorycode.'</td>';
|
||||||
|
// Label of movement
|
||||||
|
print '<td>'.$objp->label.'</td>';
|
||||||
|
// Origin of movement
|
||||||
|
print '<td>'.$origin.'</td>';
|
||||||
// Value
|
// Value
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if ($objp->value > 0) print '+';
|
if ($objp->value > 0) print '+';
|
||||||
|
|||||||
@ -249,7 +249,8 @@ if ($action == "transfert_stock" && ! $cancel)
|
|||||||
1,
|
1,
|
||||||
GETPOST("label",'san_alpha'),
|
GETPOST("label",'san_alpha'),
|
||||||
$pricesrc,
|
$pricesrc,
|
||||||
$eatby,$sellby,$batch
|
$eatby,$sellby,$batch,
|
||||||
|
GETPOST('inventorycode')
|
||||||
);
|
);
|
||||||
// Add stock
|
// Add stock
|
||||||
$result2=$product->correct_stock_batch(
|
$result2=$product->correct_stock_batch(
|
||||||
@ -259,7 +260,8 @@ if ($action == "transfert_stock" && ! $cancel)
|
|||||||
0,
|
0,
|
||||||
GETPOST("label",'san_alpha'),
|
GETPOST("label",'san_alpha'),
|
||||||
$pricedest,
|
$pricedest,
|
||||||
$eatby,$sellby,$batch
|
$eatby,$sellby,$batch,
|
||||||
|
GETPOST('inventorycode')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -272,7 +274,8 @@ if ($action == "transfert_stock" && ! $cancel)
|
|||||||
GETPOST("nbpiece"),
|
GETPOST("nbpiece"),
|
||||||
1,
|
1,
|
||||||
GETPOST("label"),
|
GETPOST("label"),
|
||||||
$pricesrc
|
$pricesrc,
|
||||||
|
GETPOST('inventorycode')
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add stock
|
// Add stock
|
||||||
@ -282,7 +285,8 @@ if ($action == "transfert_stock" && ! $cancel)
|
|||||||
GETPOST("nbpiece"),
|
GETPOST("nbpiece"),
|
||||||
0,
|
0,
|
||||||
GETPOST("label"),
|
GETPOST("label"),
|
||||||
$pricedest
|
$pricedest,
|
||||||
|
GETPOST('inventorycode')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (! $error && $result1 >= 0 && $result2 >= 0)
|
if (! $error && $result1 >= 0 && $result2 >= 0)
|
||||||
@ -630,20 +634,21 @@ if ($id > 0 || $ref)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Label of mouvement of id of inventory
|
// Label of mouvement of id of inventory
|
||||||
|
$valformovementlabel=(GETPOST("label")?GETPOST("label"):$langs->trans("MovementCorrectStock", $product->ref));
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="20%" colspan="2">'.$langs->trans("MovementLabel").'</td>';
|
print '<td width="20%" colspan="2">'.$langs->trans("MovementLabel").'</td>';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print '<input type="text" name="label" size="40" value="'.GETPOST("label").'">';
|
print '<input type="text" name="label" size="40" value="'.$valformovementlabel.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20%">'.$langs->trans("InventoryCode").'</td><td width="20%"><input class="flat" name="inventorycode" id="inventorycode" size="10" value="'.GETPOST("inventorycode").'"></td>';
|
print '<td width="20%">'.$langs->trans("InventoryCode").'</td><td width="20%"><input class="flat" name="inventorycode" id="inventorycode" size="14" value="'.GETPOST("inventorycode").'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Save').'">';
|
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Save')).'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
@ -717,11 +722,13 @@ if ($id > 0 || $ref)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
|
$valformovementlabel=(GETPOST("label")?GETPOST("label"):$langs->trans("MovementTransferStock", $product->ref));
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="15%">'.$langs->trans("MovementLabel").'</td>';
|
print '<td width="15%">'.$langs->trans("MovementLabel").'</td>';
|
||||||
print '<td colspan="5">';
|
print '<td colspan="3">';
|
||||||
print '<input type="text" name="label" size="80" value="'.dol_escape_htmltag(GETPOST("label")).'">';
|
print '<input type="text" name="label" size="60" value="'.dol_escape_htmltag($valformovementlabel).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
print '<td width="20%">'.$langs->trans("InventoryCode").'</td><td width="20%"><input class="flat" name="inventorycode" id="inventorycode" size="14" value="'.GETPOST("inventorycode").'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user