Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.9' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/comm/propal/class/propal.class.php
	htdocs/core/lib/member.lib.php
	htdocs/expedition/card.php
  • Loading branch information
eldy committed Feb 20, 2016
2 parents 277d92a + 7def330 commit d3960b0
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 18 deletions.
4 changes: 2 additions & 2 deletions htdocs/adherents/card_subscriptions.php
Expand Up @@ -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
Expand Down Expand Up @@ -40,7 +40,7 @@
$langs->load("members");
$langs->load("users");
$langs->load("mails");

$langs->load('other');

$action=GETPOST('action','alpha');
$confirm=GETPOST('confirm','alpha');
Expand Down
5 changes: 2 additions & 3 deletions htdocs/comm/propal/class/propal.class.php
Expand Up @@ -1416,7 +1416,6 @@ function fetch($rowid,$ref='')
$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;
Expand All @@ -1436,7 +1435,7 @@ function fetch($rowid,$ref='')
}
else
{
$this->error=$this->db->error();
$this->error=$this->db->lasterror();
return -1;
}

Expand All @@ -1449,7 +1448,7 @@ function fetch($rowid,$ref='')
}
else
{
$this->error=$this->db->error();
$this->error=$this->db->lasterror();
return -1;
}
}
Expand Down
1 change: 0 additions & 1 deletion htdocs/commande/card.php
Expand Up @@ -2510,7 +2510,6 @@
}
print '</div>';
}
print '<br>';

if ($action != 'presend')
{
Expand Down
3 changes: 2 additions & 1 deletion htdocs/commande/class/commande.class.php
Expand Up @@ -1229,7 +1229,8 @@ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $f
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);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/lib/member.lib.php
@@ -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
Expand Down Expand Up @@ -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;
Expand Down
14 changes: 9 additions & 5 deletions htdocs/expedition/card.php
Expand Up @@ -235,6 +235,8 @@
$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;
Expand All @@ -247,7 +249,7 @@
//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);
Expand Down Expand Up @@ -876,7 +878,8 @@
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");
Expand Down Expand Up @@ -1002,8 +1005,9 @@
{
$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.'">';
Expand All @@ -1018,10 +1022,10 @@
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
Expand Down
1 change: 1 addition & 0 deletions htdocs/expedition/class/expedition.class.php
Expand Up @@ -867,6 +867,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
6 changes: 2 additions & 4 deletions htdocs/product/stock/product.php
Expand Up @@ -493,16 +493,14 @@
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>';

Expand Down

0 comments on commit d3960b0

Please sign in to comment.