Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7

This commit is contained in:
Laurent Destailleur 2015-02-01 01:44:01 +01:00
commit e4c5aa30be
5 changed files with 23 additions and 7 deletions

View File

@ -323,6 +323,7 @@ if ($resql)
$var=true;
$total=0;
$subtotal=0;
$productstat_cache=array();
$generic_commande = new Commande($db);
$generic_product = new Product($db);
@ -351,17 +352,32 @@ if ($resql)
if ($generic_commande->lines[$lig]->product_type==0) {
$nbprod++; // order contains real products
$generic_product->id = $generic_commande->lines[$lig]->fk_product;
$generic_product->load_stock();
if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) {
$generic_product->load_stock(true);
$productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel;
} else {
$generic_product->stock_reel = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'];
}
// stock order and stock order_supplier
$stock_order=0;
$stock_order_supplier=0;
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) {
if (! empty($conf->commande->enabled)) {
$generic_product->load_stats_commande(0,'1,2');
if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) {
$generic_product->load_stats_commande(0,'1,2',true);
$productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty'];
} else {
$generic_product->stats_commande['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'];
}
$stock_order=$generic_product->stats_commande['qty'];
}
if (! empty($conf->fournisseur->enabled)) {
$generic_product->load_stats_commande_fournisseur(0,'3');
if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) {
$generic_product->load_stats_commande_fournisseur(0,'3',true);
$productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty'];
} else {
$generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'];
}
$stock_order_supplier=$generic_product->stats_commande_fournisseur['qty'];
}
}

View File

@ -1237,7 +1237,7 @@ else
* Lines of contracts
*/
if ($conf->product->enabled) {
if ($conf->product->enabled || $conf->service->enabled) {
$productstatic=new Product($db);
}
@ -1306,7 +1306,7 @@ else
$productstatic->ref=$objp->label;
print $productstatic->getNomUrl(0,'',16);
}
if (! empty($conf->global->PRODUIT_DESC_IN_FORM) and $objp->description)
if (! empty($conf->global->PRODUIT_DESC_IN_FORM) && !empty($objp->description))
print '<br>'.dol_nl2br($objp->description);
print '</td>';
}

View File

@ -2905,7 +2905,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
{
if ($currency_code == 'auto') $currency_code=$conf->currency;
$listofcurrenciesbefore=array('USD','GBP','AUD');
$listofcurrenciesbefore=array('USD','GBP','AUD','MXN');
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
else
{

View File

@ -292,7 +292,7 @@ DoNotUseInProduction=Do not use in production
ThisIsProcessToFollow=This is setup to process:
StepNb=Step %s
FindPackageFromWebSite=Find a package that provides feature you want (for example on official web site %s).
DownloadPackageFromWebSite=Download package.
DownloadPackageFromWebSite=Download package %s.
UnpackPackageInDolibarrRoot=Unpack package file into Dolibarr's root directory <b>%s</b>
SetupIsReadyForUse=Install is finished and Dolibarr is ready to use with this new component.
NotExistsDirect=The alternative root directory is not defined.<br>