diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 38c6f254bda..998dc53d525 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ $langs->load("bills"); $langs->load("members"); $langs->load("users"); $langs->load("mails"); - +$langs->load('other'); $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 423fff2f21f..922f24cb8b6 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1416,7 +1416,6 @@ class Propal extends CommonObject $line->date_start = $this->db->jdate($objp->date_start); $line->date_end = $this->db->jdate($objp->date_end); - // Multicurrency $line->fk_multicurrency = $objp->fk_multicurrency; $line->multicurrency_code = $objp->multicurrency_code; @@ -1436,7 +1435,7 @@ class Propal extends CommonObject } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); return -1; } @@ -1449,7 +1448,7 @@ class Propal extends CommonObject } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); return -1; } } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 08e2981a060..25e5d7d7d56 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2510,7 +2510,6 @@ if ($action == 'create' && $user->rights->commande->creer) } print ''; } - print '
'; if ($action != 'presend') { diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 99ff011f13f..663d07e1ccd 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1229,7 +1229,8 @@ class Commande extends CommonOrder if (empty($txlocaltax1)) $txlocaltax1=0; if (empty($txlocaltax2)) $txlocaltax2=0; if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0; - + if (empty($this->fk_multicurrency)) $this->fk_multicurrency=0; + $remise_percent=price2num($remise_percent); $qty=price2num($qty); $pu_ht=price2num($pu_ht); diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 13ea4d87201..3278f0cbdf4 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2015 Raphaƫl Doursenaud * * This program is free software; you can redistribute it and/or modify @@ -93,7 +93,7 @@ function member_prepare_head(Adherent $object) $head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; - $head[$h][2] = 'documents'; + $head[$h][2] = 'document'; $h++; $head[$h][0] = DOL_URL_ROOT.'/adherents/info.php?id='.$object->id; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index f3a2a1928b4..8238f76ad9b 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -235,6 +235,8 @@ if (empty($reshook)) $stockLine[$i][$j]['qty']=GETPOST($qty,'int'); $stockLine[$i][$j]['warehouse_id']=GETPOST($stockLocation,'int'); $stockLine[$i][$j]['ix_l']=GETPOST($idl,'int'); + + $totalqty+=GETPOST($qty,'int'); $j++; $stockLocation="ent1".$i."_".$j; @@ -247,7 +249,7 @@ if (empty($reshook)) //shipment line for product with no batch management and no multiple stock location if (GETPOST($qty,'int') > 0) $totalqty+=GETPOST($qty,'int'); } - + // Extrafields $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); $array_options[$i] = $extrafieldsline->getOptionalsFromPost($extralabelsline, $i); @@ -876,7 +878,8 @@ if ($action == 'create') print ''; if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { - print ''; + if (GETPOST('qtyl'.$indiceAsked)) $defaultqty=GETPOST('qtyl'.$indiceAsked); + print ''; print ''; } else print $langs->trans("NA"); @@ -1002,8 +1005,9 @@ if ($action == 'create') { $stock = + $stock_warehouse->real; // Convert it to number $deliverableQty = min($quantityToBeDelivered,$stock); + $deliverableQty = max(0, $deliverableQty); // Quantity to send - print ''; + print ''; if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print ''; @@ -1018,10 +1022,10 @@ if ($action == 'create') print ''; if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { - print $warehouseObject->getNomUrl(0).' / '; + print $warehouseObject->getNomUrl(0).' '; print ''; - print $stock; + print '('.$stock.')'; } else diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 78e50b27741..9ccee64c8ab 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -867,6 +867,7 @@ class Expedition extends CommonObject if (! ($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS)) { + $langs->load("errors"); $this->error=$langs->trans("ErrorWarehouseRequiredIntoShipmentLine"); return -1; } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index f3efba10999..8b64c97ba34 100755 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -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. diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 5b26f215adb..42fadf54923 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -493,16 +493,14 @@ if ($id > 0 || $ref) print $form->textwithtooltip($langs->trans("PhysicalStock"), $text_stock_options, 2, 1, img_picto('', 'info'), '', 2); print ''; print ''.$object->stock_reel; - if ($object->seuil_stock_alerte && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); + if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); print ''; print ''; // Calculating a theorical value print ''.$langs->trans("VirtualStock").''; print "".(empty($object->stock_theorique)?0:$object->stock_theorique); - if ($object->stock_theorique < $object->seuil_stock_alerte) { - print ' '.img_warning($langs->trans("StockLowerThanLimit")); - } + if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); print ''; print '';