Merge remote-tracking branch 'origin/3.9' into develop

Conflicts:
	htdocs/comm/propal/class/propal.class.php
	htdocs/core/lib/member.lib.php
	htdocs/expedition/card.php
This commit is contained in:
Laurent Destailleur 2016-02-20 04:25:39 +01:00
commit d3960b0809
9 changed files with 21 additions and 18 deletions

View File

@ -3,7 +3,7 @@
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* 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');

View File

@ -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;
}
}

View File

@ -2510,7 +2510,6 @@ if ($action == 'create' && $user->rights->commande->creer)
}
print '</div>';
}
print '<br>';
if ($action != 'presend')
{

View File

@ -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);

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* 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].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents';
$head[$h][2] = 'document';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/adherents/info.php?id='.$object->id;

View File

@ -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 '<td align="center">';
if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
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="'.$deliverableQty.'">';
}
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 '<tr><td colspan="3" ></td><td align="center">';
print '<tr><td colspan="3" ></td><td align="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->';
if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">';
@ -1018,10 +1022,10 @@ if ($action == 'create')
print '<td align="left">';
if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
print $warehouseObject->getNomUrl(0).' / ';
print $warehouseObject->getNomUrl(0).' ';
print '<!-- Show details of stock -->';
print $stock;
print '('.$stock.')';
}
else

View File

@ -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;
}

View File

@ -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.

View File

@ -493,16 +493,14 @@ if ($id > 0 || $ref)
print $form->textwithtooltip($langs->trans("PhysicalStock"), $text_stock_options, 2, 1, img_picto('', 'info'), '', 2);
print '</td>';
print '<td>'.$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 '</td>';
print '</tr>';
// Calculating a theorical value
print '<tr><td>'.$langs->trans("VirtualStock").'</td>';
print "<td>".(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 '</td>';
print '</tr>';