Skip to content

Commit

Permalink
Fix missing error message and input lost in shipment create page
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 20, 2016
1 parent 2e27319 commit 7def330
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions htdocs/expedition/card.php
Expand Up @@ -852,9 +852,10 @@
if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() && is_object($product->stock_warehouse[$warehouse_id])))
{
// Quantity to send
print '<td align="center">';
print '<td align="center"><!-- qty to ship (no lot management) -->';
if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
if (GETPOST('qtyl'.$indiceAsked)) $defaultqty=GETPOST('qtyl'.$indiceAsked);
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$defaultqty.'">';
}
Expand Down Expand Up @@ -931,7 +932,7 @@
{
//var_dump($dbatch);
$substock=$dbatch->qty +0 ; // To get a numeric
print '<tr><td colspan="3" ></td><td align="center">';
print '<tr><td colspan="3" ></td><td align="center"><!-- qty to ship (with lot management) -->';
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.($substock > 0 ? min($defaultqty,$substock) : '0').'">';
print '</td>';

Expand Down
1 change: 1 addition & 0 deletions htdocs/expedition/class/expedition.class.php
Expand Up @@ -853,6 +853,7 @@ function addline($entrepot_id, $id, $qty,$array_options=0)

if (! ($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS))
{
$langs->load("errors");
$this->error=$langs->trans("ErrorWarehouseRequiredIntoShipmentLine");
return -1;
}
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/errors.lang
Expand Up @@ -172,6 +172,7 @@ ErrorMandatoryParametersNotProvided=Mandatory parameter(s) not provided
ErrorOppStatusRequiredIfAmount=You set an estimated amount for this opportunity/lead. So you must also enter its status
ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Bad Definition Of Menu Array In Module Descriptor (bad value for key fk_menu)
ErrorSavingChanges=An error has ocurred when saving the changes
ErrorWarehouseRequiredIntoShipmentLine=Warehouse is required on the line to ship

# Warnings
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
Expand Down

0 comments on commit 7def330

Please sign in to comment.