*
* 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
@@ -765,20 +766,20 @@ SCRIPT;
print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("SupplierRef", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) print_liste_field_titre("Availability", $_SERVER["PHP_SELF"], "pfp.fk_availability", "", $param, "", $sortfield, $sortorder);
- print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "pfp.quantity", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("PriceQtyMinHT", $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "pfp.quantity", "", $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("PriceQtyMinHT", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
if ($conf->multicurrency->enabled) {
- print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
}
- print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "pfp.unitprice", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "pfp.unitprice", "", $param, '', $sortfield, $sortorder, 'right ');
if ($conf->multicurrency->enabled) {
- print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
}
- print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre('');
print "\n";
@@ -798,11 +799,11 @@ SCRIPT;
// Supplier ref
if ($user->rights->produit->creer || $user->rights->service->creer) // change required right here
{
- print ''.$productfourn->getNomUrl().' ';
+ print ''.$productfourn->getNomUrl().' ';
}
else
{
- print ''.$productfourn->fourn_ref.' ';
+ print ''.$productfourn->fourn_ref.' ';
}
// Availability
@@ -814,57 +815,57 @@ SCRIPT;
}
// Quantity
- print '';
+ print ' ';
print $productfourn->fourn_qty;
print ' ';
// VAT rate
- print '';
+ print ' ';
print vatrate($productfourn->fourn_tva_tx, true);
print ' ';
// Price for the quantity
- print '';
+ print ' ';
print $productfourn->fourn_price?price($productfourn->fourn_price):"";
print ' ';
if ($conf->multicurrency->enabled) {
// Price for the quantity in currency
- print '';
+ print ' ';
print $productfourn->fourn_multicurrency_price ? price($productfourn->fourn_multicurrency_price) : "";
print ' ';
}
// Unit price
- print '';
+ print ' ';
print price($productfourn->fourn_unitprice);
//print $objp->unitprice? price($objp->unitprice) : ($objp->quantity?price($objp->price/$objp->quantity):" ");
print ' ';
if ($conf->multicurrency->enabled) {
// Unit price in currency
- print '';
+ print ' ';
print price($productfourn->fourn_multicurrency_unitprice);
print ' ';
// Currency
- print '';
+ print ' ';
print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : '';
print ' ';
}
// Discount
- print '';
+ print ' ';
print price2num($productfourn->fourn_remise_percent).'%';
print ' ';
// Delivery delay
- print '';
+ print ' ';
print $productfourn->delivery_time_days;
print ' ';
// Reputation
- print '';
+ print ' ';
if (!empty($productfourn->supplier_reputation) && !empty($object->reputations[$productfourn->supplier_reputation])) {
print $object->reputations[$productfourn->supplier_reputation];
}
diff --git a/htdocs/product/index.php b/htdocs/product/index.php
index 91d6f3f4681..950f4d47b5f 100644
--- a/htdocs/product/index.php
+++ b/htdocs/product/index.php
@@ -4,7 +4,8 @@
* Copyright (C) 2005-2014 Regis Houssin
* Copyright (C) 2014-2016 Charlie BENKE
* Copyright (C) 2015 Jean-François Ferry
- * Copyright (C) 2019 Pierre Ardoin
+ * Copyright (C) 2019 Pierre Ardoin
+ * Copyright (C) 2019 Frédéric France
*
* 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
@@ -21,7 +22,7 @@
*/
/**
- * \file htdocs/product/index.php
+ * \file htdocs/product/index.php
* \ingroup product
* \brief Homepage products and services
*/
@@ -142,31 +143,31 @@ print ''.$langs->trans("Statistics").'
if (! empty($conf->product->enabled))
{
$statProducts = ' ';
- $statProducts.= ''.$langs->trans("ProductsNotOnSell").' '.round($prodser[0][0]).' ';
+ $statProducts.= ''.$langs->trans("ProductsNotOnSell").' '.round($prodser[0][0]).' ';
$statProducts.= " ";
$statProducts.= '';
- $statProducts.= ''.$langs->trans("ProductsOnSaleOnly").' '.round($prodser[0][1]).' ';
+ $statProducts.= ''.$langs->trans("ProductsOnSaleOnly").' '.round($prodser[0][1]).' ';
$statProducts.= " ";
$statProducts.= '';
- $statProducts.= ''.$langs->trans("ProductsOnPurchaseOnly").' '.round($prodser[0][2]).' ';
+ $statProducts.= ''.$langs->trans("ProductsOnPurchaseOnly").' '.round($prodser[0][2]).' ';
$statProducts.= " ";
$statProducts.= '';
- $statProducts.= ''.$langs->trans("ProductsOnSellAndOnBuy").' '.round($prodser[0][3]).' ';
+ $statProducts.= ''.$langs->trans("ProductsOnSellAndOnBuy").' '.round($prodser[0][3]).' ';
$statProducts.= " ";
}
if (! empty($conf->service->enabled))
{
$statServices = '';
- $statServices.= ''.$langs->trans("ServicesNotOnSell").' '.round($prodser[1][0]).' ';
+ $statServices.= ''.$langs->trans("ServicesNotOnSell").' '.round($prodser[1][0]).' ';
$statServices.= " ";
$statServices.= '';
- $statServices.= ''.$langs->trans("ServicesOnSaleOnly").' '.round($prodser[1][1]).' ';
+ $statServices.= ''.$langs->trans("ServicesOnSaleOnly").' '.round($prodser[1][1]).' ';
$statServices.= " ";
$statServices.= '';
- $statServices.= ''.$langs->trans("ServicesOnPurchaseOnly").' '.round($prodser[1][2]).' ';
+ $statServices.= ''.$langs->trans("ServicesOnPurchaseOnly").' '.round($prodser[1][2]).' ';
$statServices.= " ";
$statServices.= '';
- $statServices.= ''.$langs->trans("ServicesOnSellAndOnBuy").' '.round($prodser[1][3]).' ';
+ $statServices.= ''.$langs->trans("ServicesOnSellAndOnBuy").' '.round($prodser[1][3]).' ';
$statServices.= " ";
}
$total=0;
@@ -185,7 +186,7 @@ else
print $statProducts.$statServices;
$total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2])+round($prodser[0][3])+round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2])+round($prodser[1][3]); //Calcul du Total des Produits et Services
}
-print ''.$langs->trans("Total").' ';
+print ' '.$langs->trans("Total").' ';
print $total;
print ' ';
print '';
@@ -198,7 +199,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS
print '';
print '
';
print ''.$langs->trans("Categories").' ';
- print '';
+ print ' ';
$sql = "SELECT c.label, count(*) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."categorie_product as cs";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
@@ -258,7 +259,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS
}
}
print ' ';
- print ''.$langs->trans("Total").' ';
+ print ' '.$langs->trans("Total").' ';
print $total;
print ' ';
print '
';
@@ -356,15 +357,15 @@ if ($result)
$objp->price = $price_result;
}
}
- print '
';
+ print ' ';
if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC");
else print price($objp->price).' '.$langs->trans("HT");
print ' ';
}
- print '
';
+ print ' ';
print $product_static->LibStatut($objp->tosell, 3, 0);
print " ";
- print '
';
+ print ' ';
print $product_static->LibStatut($objp->tobuy, 3, 1);
print " ";
print "\n";
@@ -444,14 +445,14 @@ function activitytrim($product_type)
print '
';
if ($product_type==0)
- print ''.$langs->trans("ProductSellByQuarterHT").' ';
+ print ''.$langs->trans("ProductSellByQuarterHT").' ';
else
- print ''.$langs->trans("ServiceSellByQuarterHT").' ';
- print ''.$langs->trans("Quarter1").' ';
- print ''.$langs->trans("Quarter2").' ';
- print ''.$langs->trans("Quarter3").' ';
- print ''.$langs->trans("Quarter4").' ';
- print ''.$langs->trans("Total").' ';
+ print ''.$langs->trans("ServiceSellByQuarterHT").' ';
+ print ''.$langs->trans("Quarter1").' ';
+ print ''.$langs->trans("Quarter2").' ';
+ print ''.$langs->trans("Quarter3").' ';
+ print ''.$langs->trans("Quarter4").' ';
+ print ''.$langs->trans("Total").' ';
print ' ';
}
$i = 0;
@@ -463,12 +464,12 @@ function activitytrim($product_type)
{
if ($trim1+$trim2+$trim3+$trim4 > 0)
{
- print ''.$tmpyear.' ';
- print ''.price($trim1).' ';
- print ''.price($trim2).' ';
- print ''.price($trim3).' ';
- print ''.price($trim4).' ';
- print ''.price($trim1+$trim2+$trim3+$trim4).' ';
+ print ''.$tmpyear.' ';
+ print ''.price($trim1).' ';
+ print ''.price($trim2).' ';
+ print ''.price($trim3).' ';
+ print ''.price($trim4).' ';
+ print ''.price($trim1+$trim2+$trim3+$trim4).' ';
print ' ';
$lgn++;
}
@@ -496,12 +497,12 @@ function activitytrim($product_type)
}
if ($trim1+$trim2+$trim3+$trim4 > 0)
{
- print ''.$tmpyear.' ';
- print ''.price($trim1).' ';
- print ''.price($trim2).' ';
- print ''.price($trim3).' ';
- print ''.price($trim4).' ';
- print ''.price($trim1+$trim2+$trim3+$trim4).' ';
+ print ''.$tmpyear.' ';
+ print ''.price($trim1).' ';
+ print ''.price($trim2).' ';
+ print ''.price($trim3).' ';
+ print ''.price($trim4).' ';
+ print ''.price($trim1+$trim2+$trim3+$trim4).' ';
print ' ';
}
if ($num > 0 )
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index dd2ae7bed87..b37a0d31df9 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -514,26 +514,26 @@ if ($resql)
print '';
if (! empty($arrayfields['p.ref']['checked']))
{
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['pfp.ref_fourn']['checked']))
{
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['p.label']['checked']))
{
- print '';
+ print ' ';
print ' ';
print ' ';
}
// Type
if (! empty($arrayfields['p.fk_product_type']['checked']))
{
- print '';
+ print ' ';
$array=array('-1'=>' ', '0'=>$langs->trans('Product'), '1'=>$langs->trans('Service'));
print $form->selectarray('search_type', $array, $search_type);
print ' ';
@@ -555,7 +555,7 @@ if ($resql)
// Sell price
if (! empty($arrayfields['p.sellprice']['checked']))
{
- print '';
+ print ' ';
print ' ';
}
// Minimum buying Price
@@ -623,17 +623,17 @@ if ($resql)
}
if (! empty($arrayfields['p.tosell']['checked']))
{
- print '';
+ print ' ';
print $form->selectarray('search_tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')), $search_tosell, 1);
print ' ';
}
if (! empty($arrayfields['p.tobuy']['checked']))
{
- print '';
+ print ' ';
print $form->selectarray('search_tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')), $search_tobuy, 1);
print ' ';
}
- print '';
+ print ' ';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print ' ';
@@ -641,39 +641,81 @@ if ($resql)
print ' ';
print '';
- if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['pfp.ref_fourn']['checked'])) print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"], "pfp.ref_fourn", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], "p.label", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['p.fk_product_type']['checked'])) print_liste_field_titre($arrayfields['p.fk_product_type']['label'], $_SERVER["PHP_SELF"], "p.fk_product_type", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['p.barcode']['checked'])) print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"], "p.barcode", "", $param, "", $sortfield, $sortorder);
- if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"], "p.duration", "", $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.sellprice']['checked'])) print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.minbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.numbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.numbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.pmp']['checked'])) print_liste_field_titre($arrayfields['p.pmp']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) print_liste_field_titre($arrayfields['p.seuil_stock_alerte']['label'], $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.desiredstock']['checked'])) print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"], "p.desiredstock", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.stock']['checked'])) print_liste_field_titre($arrayfields['p.stock']['label'], $_SERVER["PHP_SELF"], "p.stock", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['stock_virtual']['checked'])) print_liste_field_titre($arrayfields['stock_virtual']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.tobatch']['checked'])) print_liste_field_titre($arrayfields['p.tobatch']['label'], $_SERVER["PHP_SELF"], "p.tobatch", "", $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.accountancy_code_sell']['checked'])) print_liste_field_titre($arrayfields['p.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_sell", "", $param, '', $sortfield, $sortorder);
- if (! empty($arrayfields['p.accountancy_code_buy']['checked'])) print_liste_field_titre($arrayfields['p.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_buy", "", $param, '', $sortfield, $sortorder);
+ if (! empty($arrayfields['p.ref']['checked'])) {
+ print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['pfp.ref_fourn']['checked'])) {
+ print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"], "pfp.ref_fourn", "", $param, "", $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['p.label']['checked'])) {
+ print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], "p.label", "", $param, "", $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['p.fk_product_type']['checked'])) {
+ print_liste_field_titre($arrayfields['p.fk_product_type']['label'], $_SERVER["PHP_SELF"], "p.fk_product_type", "", $param, "", $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['p.barcode']['checked'])) {
+ print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"], "p.barcode", "", $param, "", $sortfield, $sortorder);
+ }
+ if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) {
+ print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"], "p.duration", "", $param, '', $sortfield, $sortorder, 'center ');
+ }
+ if (! empty($arrayfields['p.sellprice']['checked'])) {
+ print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['p.minbuyprice']['checked'])) {
+ print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['p.numbuyprice']['checked'])) {
+ print_liste_field_titre($arrayfields['p.numbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['p.pmp']['checked'])) {
+ print_liste_field_titre($arrayfields['p.pmp']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) {
+ print_liste_field_titre($arrayfields['p.seuil_stock_alerte']['label'], $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['p.desiredstock']['checked'])) {
+ print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"], "p.desiredstock", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['p.stock']['checked'])) {
+ print_liste_field_titre($arrayfields['p.stock']['label'], $_SERVER["PHP_SELF"], "p.stock", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['stock_virtual']['checked'])) {
+ print_liste_field_titre($arrayfields['stock_virtual']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['p.tobatch']['checked'])) {
+ print_liste_field_titre($arrayfields['p.tobatch']['label'], $_SERVER["PHP_SELF"], "p.tobatch", "", $param, '', $sortfield, $sortorder, 'center ');
+ }
+ if (! empty($arrayfields['p.accountancy_code_sell']['checked'])) {
+ print_liste_field_titre($arrayfields['p.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_sell", "", $param, '', $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['p.accountancy_code_buy']['checked'])) {
+ print_liste_field_titre($arrayfields['p.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_buy", "", $param, '', $sortfield, $sortorder);
+ }
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
- if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.tosell']['checked'])) print_liste_field_titre($arrayfields['p.tosell']['label'], $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['p.tobuy']['checked'])) print_liste_field_titre($arrayfields['p.tobuy']['label'], $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
- print " \n";
+ if (! empty($arrayfields['p.datec']['checked'])) {
+ print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ }
+ if (! empty($arrayfields['p.tms']['checked'])) {
+ print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ }
+ if (! empty($arrayfields['p.tosell']['checked'])) {
+ print_liste_field_titre($arrayfields['p.tosell']['label'], $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['p.tobuy']['checked'])) {
+ print_liste_field_titre($arrayfields['p.tobuy']['label'], $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
+ print "\n";
- $product_static=new Product($db);
- $product_fourn =new ProductFournisseur($db);
+ $product_static = new Product($db);
+ $product_fourn = new ProductFournisseur($db);
$i = 0;
$totalarray=array();
@@ -776,7 +818,7 @@ if ($resql)
// Duration
if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked']))
{
- print '';
+ print ' ';
if (preg_match('/([^a-z]+)[a-z]$/i', $obj->duration))
{
@@ -842,7 +884,7 @@ if ($resql)
// Number of buy prices
if (! empty($arrayfields['p.numbuyprice']['checked']))
{
- print ' ';
+ print ' ';
if ($obj->tobuy)
{
if (count($productFournList = $product_fourn->list_product_fournisseur_price($obj->rowid)) > 0)
@@ -857,7 +899,7 @@ if ($resql)
// WAP
if (! empty($arrayfields['p.pmp']['checked']))
{
- print ' ';
+ print ' ';
print price($product_static->pmp, 1, $langs);
print ' ';
}
@@ -865,7 +907,7 @@ if ($resql)
// Limit alert
if (! empty($arrayfields['p.seuil_stock_alerte']['checked']))
{
- print '';
+ print ' ';
if ($obj->fk_product_type != 1)
{
print $obj->seuil_stock_alerte;
@@ -876,7 +918,7 @@ if ($resql)
// Desired stock
if (! empty($arrayfields['p.desiredstock']['checked']))
{
- print ' ';
+ print ' ';
if ($obj->fk_product_type != 1)
{
print $obj->desiredstock;
@@ -887,7 +929,7 @@ if ($resql)
// Stock real
if (! empty($arrayfields['p.stock']['checked']))
{
- print ' ';
+ print ' ';
if ($obj->fk_product_type != 1)
{
if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
@@ -899,7 +941,7 @@ if ($resql)
// Stock virtual
if (! empty($arrayfields['stock_virtual']['checked']))
{
- print ' ';
+ print ' ';
if ($obj->fk_product_type != 1)
{
if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
@@ -911,7 +953,7 @@ if ($resql)
// Lot/Serial
if (! empty($arrayfields['p.tobatch']['checked']))
{
- print ' ';
+ print ' ';
print yn($obj->tobatch);
print ' ';
if (! $i) $totalarray['nbfield']++;
@@ -937,7 +979,7 @@ if ($resql)
// Date creation
if (! empty($arrayfields['p.datec']['checked']))
{
- print '';
+ print ' ';
print dol_print_date($obj->date_creation, 'dayhour', 'tzuser');
print ' ';
if (! $i) $totalarray['nbfield']++;
@@ -945,7 +987,7 @@ if ($resql)
// Date modification
if (! empty($arrayfields['p.tms']['checked']))
{
- print '';
+ print ' ';
print dol_print_date($obj->date_update, 'dayhour', 'tzuser');
print ' ';
if (! $i) $totalarray['nbfield']++;
@@ -954,7 +996,7 @@ if ($resql)
// Status (to sell)
if (! empty($arrayfields['p.tosell']['checked']))
{
- print '';
+ print ' ';
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
} else {
@@ -966,7 +1008,7 @@ if ($resql)
// Status (to buy)
if (! empty($arrayfields['p.tobuy']['checked']))
{
- print ' ';
+ print ' ';
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
} else {
@@ -976,7 +1018,7 @@ if ($resql)
if (! $i) $totalarray['nbfield']++;
}
// Action
- print ' ';
+ print ' ';
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected=0;
diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php
index 897763f4d91..8efbf7667ba 100644
--- a/htdocs/product/popuprop.php
+++ b/htdocs/product/popuprop.php
@@ -163,7 +163,7 @@ print " ";
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre('Type', $_SERVER["PHP_SELF"], 'p.fk_product_type', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder);
-print_liste_field_titre('NbOfQtyInProposals', $_SERVER["PHP_SELF"], 'c', '', $param, 'align="right"', $sortfield, $sortorder);
+print_liste_field_titre('NbOfQtyInProposals', $_SERVER["PHP_SELF"], 'c', '', $param, '', $sortfield, $sortorder, 'right ');
print " \n";
foreach($infoprod as $prodid => $vals)
@@ -196,7 +196,7 @@ foreach($infoprod as $prodid => $vals)
else print $langs->trans("Product");
print '';
print ''.$vals['label'].' ';
- print ''.$vals['nblineproposal'].' ';
+ print ''.$vals['nblineproposal'].' ';
print "\n";
$i++;
}
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index ec1987d4764..0738d421c3c 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -893,9 +893,9 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI
print '';
print '' . $langs->trans("PriceByQuantityRange") . ' ' . $i . ' ';
- print '' . $langs->trans("HT") . ' ';
- print '' . $langs->trans("UnitPrice") . ' ';
- print '' . $langs->trans("Discount") . ' ';
+ print '' . $langs->trans("HT") . ' ';
+ print '' . $langs->trans("UnitPrice") . ' ';
+ print '' . $langs->trans("Discount") . ' ';
print ' ';
print ' ';
foreach ($object->prices_by_qty_list[$i] as $ii => $prices)
@@ -907,18 +907,18 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI
print ' ';
print '';
print ' ';
- print ' ' . $object->price_base_type . ' ';
- print ' % ';
- print ' ';
+ print ' ' . $object->price_base_type . ' ';
+ print ' % ';
+ print ' ';
print ' ';
print '';
} else {
print '';
print '' . $prices['quantity'] . ' ';
- print '' . price($prices['price']) . ' ';
- print '' . price($prices['unitprice']) . ' ';
- print '' . price($prices['remise_percent']) . ' % ';
- print '';
+ print ' ' . price($prices['price']) . ' ';
+ print '' . price($prices['unitprice']) . ' ';
+ print '' . price($prices['remise_percent']) . ' % ';
+ print '';
if (($user->rights->produit->creer || $user->rights->service->creer)) {
print 'id . '&action=edit_price_by_qty&rowid=' . $prices["rowid"] . '">';
print img_edit() . ' ';
@@ -938,10 +938,10 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI
print ' '; // id in product_price
print ' ';
print ' ';
- print ' ' . $object->price_base_type . ' ';
- print ' ';
- print ' % ';
- print ' ';
+ print ' ' . $object->price_base_type . ' ';
+ print ' ';
+ print ' % ';
+ print ' ';
print ' ';
print '';
}
@@ -1013,10 +1013,10 @@ else
print '';
//print '' . $langs->trans("PriceByQuantityRange") . ' ';
print '' . $langs->trans("Quantity") . ' ';
- print '' . $langs->trans("Price") . ' ';
- print ' ';
- print '' . $langs->trans("UnitPrice") . ' ';
- print '' . $langs->trans("Discount") . ' ';
+ print '' . $langs->trans("Price") . ' ';
+ print ' ';
+ print '' . $langs->trans("UnitPrice") . ' ';
+ print '' . $langs->trans("Discount") . ' ';
print ' ';
print ' ';
if ($action != 'edit_price_by_qty')
@@ -1028,13 +1028,13 @@ else
print '';
print ' ';
- print ' ';
+ print ' ';
print '';
//print $object->price_base_type;
print ' ';
- print ' ';
- print ' % ';
- print ' ';
+ print ' ';
+ print ' % ';
+ print ' ';
print ' ';
print '';
@@ -1049,27 +1049,27 @@ else
print ' '; // id in product_price_by_qty
print '';
print ' ';
- print ' ';
- print '';
+ print ' ';
+ print '';
//print $object->price_base_type;
print $prices['price_base_type'];
print ' ';
- print ' ';
- print ' % ';
- print ' ';
+ print ' ';
+ print ' % ';
+ print ' ';
print ' ';
print '';
} else {
print '';
print '' . $prices['quantity'] . ' ';
- print '' . price($prices['price']) . ' ';
- print '';
+ print ' ' . price($prices['price']) . ' ';
+ print '';
//print $object->price_base_type;
print $prices['price_base_type'];
print ' ';
- print '' . price($prices['unitprice']) . ' ';
- print '' . price($prices['remise_percent']) . ' % ';
- print '';
+ print ' ' . price($prices['unitprice']) . ' ';
+ print '' . price($prices['remise_percent']) . ' % ';
+ print '';
if (($user->rights->produit->creer || $user->rights->service->creer))
{
print 'id . '&action=edit_price_by_qty&rowid=' . $prices["rowid"] . '">';
@@ -1475,25 +1475,25 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
print ' ' . $langs->trans("AppliedPricesFrom") . ' ';
if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
- print '' . $langs->trans("PriceLevel") . ' ';
+ print '' . $langs->trans("PriceLevel") . ' ';
}
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
- print '' . $langs->trans("Type") . ' ';
+ print '' . $langs->trans("Type") . ' ';
}
- print '' . $langs->trans("PriceBase") . ' ';
+ print '' . $langs->trans("PriceBase") . ' ';
print $conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL;
- if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) print '' . $langs->trans("DefaultTaxRate") . ' ';
- print '' . $langs->trans("HT") . ' ';
- print '' . $langs->trans("TTC") . ' ';
+ if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) print '' . $langs->trans("DefaultTaxRate") . ' ';
+ print '' . $langs->trans("HT") . ' ';
+ print '' . $langs->trans("TTC") . ' ';
if (! empty($conf->dynamicprices->enabled)) {
- print '' . $langs->trans("PriceExpressionSelected") . ' ';
+ print '' . $langs->trans("PriceExpressionSelected") . ' ';
}
- print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . ' ';
- print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . ' ';
- print '' . $langs->trans("ChangedBy") . ' ';
+ print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . ' ';
+ print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . ' ';
+ print '' . $langs->trans("ChangedBy") . ' ';
if ($user->rights->produit->supprimer)
- print ' ';
+ print ' ';
print ' ';
$notfirstlineforlevel=array();
@@ -1509,16 +1509,16 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
// Price level
if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
- print '' . $objp->price_level . " ";
+ print '' . $objp->price_level . " ";
}
// Price by quantity
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))
{
$type = ($objp->price_by_qty == 1) ? 'PriceByQuantity' : 'Standard';
- print '' . $langs->trans($type) . " ";
+ print '' . $langs->trans($type) . " ";
}
- print '';
+ print ' ';
if (empty($objp->price_by_qty)) {
print $langs->trans($objp->price_base_type);
}
@@ -1526,7 +1526,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))
{
- print ' ';
+ print ' ';
if (empty($objp->price_by_qty)) {
$positiverates='';
@@ -1552,41 +1552,41 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
$price_expression = new PriceExpression($db);
$res = $price_expression->fetch($objp->fk_price_expression);
$title = $price_expression->title;
- print ' ';
- print ' ';
- print '' . $title . " ";
+ print ' ';
+ print ' ';
+ print '' . $title . " ";
}
else
{
- print '';
+ print ' ';
if (empty($objp->price_by_qty)) {
print ($objp->price_base_type != 'TTC' ? price($objp->price) : '');
}
print " ";
- print '';
+ print ' ';
if (empty($objp->price_by_qty)) {
print ($objp->price_base_type == 'TTC' ? price($objp->price_ttc) : '');
}
print " ";
if (! empty($conf->dynamicprices->enabled)) { //Only if module is enabled
- print ' ';
+ print ' ';
}
}
- print '';
+ print ' ';
if (empty($objp->price_by_qty)) {
print ($objp->price_base_type != 'TTC' ? price($objp->price_min) : '');
}
print ' ';
- print '';
+ print ' ';
if (empty($objp->price_by_qty)) {
print ($objp->price_base_type == 'TTC' ? price($objp->price_min_ttc) : '');
}
print ' ';
// User
- print '' . img_object($langs->trans("ShowUser"), 'user') . ' ' . $objp->login . ' ';
+ print '' . img_object($langs->trans("ShowUser"), 'user') . ' ' . $objp->login . ' ';
// Action
if ($user->rights->produit->supprimer)
@@ -1599,7 +1599,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
}
elseif ($i > 0) $candelete=1;
- print '';
+ print ' ';
if ($candelete)
{
print 'id . '&lineid=' . $objp->rowid . '">';
@@ -1866,21 +1866,21 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '';
print '' . $langs->trans("ThirdParty") . ' ';
print '' . $langs->trans("AppliedPricesFrom") . ' ';
- print '' . $langs->trans("PriceBase") . ' ';
- print '' . $langs->trans("DefaultTaxRate") . ' ';
- print '' . $langs->trans("HT") . ' ';
+ print '' . $langs->trans("PriceBase") . ' ';
+ print '' . $langs->trans("DefaultTaxRate") . ' ';
+ print '' . $langs->trans("HT") . ' ';
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{
- //print '' . $langs->trans("INCVATONLY") . ' ';
- print '' . $langs->trans("INCT") . ' ';
+ //print '' . $langs->trans("INCVATONLY") . ' ';
+ print '' . $langs->trans("INCT") . ' ';
}
else
{
- print '' . $langs->trans("TTC") . ' ';
+ print '' . $langs->trans("TTC") . ' ';
}
- print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . ' ';
- print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . ' ';
- print '' . $langs->trans("ChangedBy") . ' ';
+ print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . ' ';
+ print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . ' ';
+ print '' . $langs->trans("ChangedBy") . ' ';
print ' ';
print ' ';
@@ -1917,8 +1917,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print " " . $staticsoc->getNomUrl(1) . " ";
print "" . dol_print_date($line->datec, "dayhour") . " ";
- print '' . $langs->trans($line->price_base_type) . " ";
- print '';
+ print ' ' . $langs->trans($line->price_base_type) . " ";
+ print '';
$positiverates='';
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
@@ -1930,25 +1930,25 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
//. vatrate($tva_tx, true, $line->recuperableonly) .
print " ";
- print '' . price($line->price) . " ";
+ print '' . price($line->price) . " ";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{
- //print '' . price($line->price_ttc) . " ";
- print '' . price($resultarray[2]) . ' ';
+ //print '' . price($line->price_ttc) . " ";
+ print '' . price($resultarray[2]) . ' ';
}
else
{
- print '' . price($line->price_ttc) . " ";
+ print '' . price($line->price_ttc) . " ";
}
- print '' . price($line->price_min) . ' ';
- print '' . price($line->price_min_ttc) . ' ';
+ print '' . price($line->price_min) . ' ';
+ print '' . price($line->price_min_ttc) . ' ';
// User
$userstatic = new User($db);
$userstatic->fetch($line->fk_user);
- print '';
+ print ' ';
print $userstatic->getLoginUrl(1);
print ' ';
print '';
@@ -1992,7 +1992,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print ' ';
print ' ';
// Print the search button
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
@@ -2002,22 +2002,22 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '';
print '' . $langs->trans("ThirdParty") . ' ';
print '' . $langs->trans("AppliedPricesFrom") . ' ';
- print '' . $langs->trans("PriceBase") . ' ';
- print '' . $langs->trans("DefaultTaxRate") . ' ';
- print '' . $langs->trans("HT") . ' ';
+ print '' . $langs->trans("PriceBase") . ' ';
+ print '' . $langs->trans("DefaultTaxRate") . ' ';
+ print '' . $langs->trans("HT") . ' ';
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{
- //print '' . $langs->trans("INCVATONLY") . ' ';
- print '' . $langs->trans("INCT") . ' ';
+ //print '' . $langs->trans("INCVATONLY") . ' ';
+ print '' . $langs->trans("INCT") . ' ';
}
else
{
- print '' . $langs->trans("TTC") . ' ';
+ print '' . $langs->trans("TTC") . ' ';
}
- print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . ' ';
- print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . ' ';
- print '' . $langs->trans("ChangedBy") . ' ';
+ print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . ' ';
+ print '' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . ' ';
+ print '' . $langs->trans("ChangedBy") . ' ';
print ' ';
print ' ';
@@ -2046,8 +2046,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print "" . $langs->trans("Default") . " ";
print "" . " ";
- print '' . $langs->trans($object->price_base_type) . " ";
- print '';
+ print ' ' . $langs->trans($object->price_base_type) . " ";
+ print '';
$positiverates='';
if (price2num($object->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($object->tva_tx);
@@ -2060,26 +2060,26 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
//print $object->default_vat_code?' ('.$object->default_vat_code.')':'';
print " ";
- print '' . price($object->price) . " ";
+ print '' . price($object->price) . " ";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{
- //print '' . price($object->price_ttc) . " ";
- print '' . price($resultarray[2]) . ' ';
+ //print '' . price($object->price_ttc) . " ";
+ print '' . price($resultarray[2]) . ' ';
}
else
{
- print '' . price($object->price_ttc) . " ";
+ print '' . price($object->price_ttc) . " ";
}
- print '' . price($object->price_min) . ' ';
- print '' . price($object->price_min_ttc) . ' ';
- print '';
+ print ' ' . price($object->price_min) . ' ';
+ print '' . price($object->price_min_ttc) . ' ';
+ print '';
print ' ';
if ($user->rights->produit->supprimer || $user->rights->service->supprimer)
{
- print '';
+ print ' ';
print 'id . '">';
print img_info($langs->trans('PriceByCustomerLog'));
print ' ';
@@ -2128,8 +2128,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print " " . $staticsoc->getNomUrl(1) . " ";
print "" . dol_print_date($line->datec, "dayhour") . " ";
- print '' . $langs->trans($line->price_base_type) . " ";
- print '';
+ print ' ' . $langs->trans($line->price_base_type) . " ";
+ print '';
$positiverates='';
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
@@ -2139,25 +2139,25 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
echo vatrate($positiverates.($line->default_vat_code?' ('.$line->default_vat_code.')':''), '%', ($line->tva_npr?$line->tva_npr:$line->recuperableonly));
print " ";
- print '' . price($line->price) . " ";
+ print '' . price($line->price) . " ";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{
- //print '' . price($line->price_ttc) . " ";
- print '' . price($resultarray[2]) . ' ';
+ //print '' . price($line->price_ttc) . " ";
+ print '' . price($resultarray[2]) . ' ';
}
else
{
- print '' . price($line->price_ttc) . " ";
+ print '' . price($line->price_ttc) . " ";
}
- print '' . price($line->price_min) . ' ';
- print '' . price($line->price_min_ttc) . ' ';
+ print '' . price($line->price_min) . ' ';
+ print '' . price($line->price_min_ttc) . ' ';
// User
$userstatic = new User($db);
$userstatic->fetch($line->fk_user);
- print '';
+ print ' ';
print $userstatic->getLoginUrl(1);
print ' ';
@@ -2165,7 +2165,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
// Action
if ($user->rights->produit->supprimer || $user->rights->service->supprimer)
{
- print '';
+ print ' ';
print 'id . '&socid=' . $line->fk_soc . '">';
print img_info($langs->trans('PriceByCustomerLog'));
print ' ';
diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php
index dd7bc25dc4c..f4ee61190e8 100644
--- a/htdocs/product/stock/card.php
+++ b/htdocs/product/stock/card.php
@@ -443,13 +443,21 @@ else
print " ";
print_liste_field_titre("Product", "", "p.ref", "&id=".$id, "", "", $sortfield, $sortorder);
print_liste_field_titre("Label", "", "p.label", "&id=".$id, "", "", $sortfield, $sortorder);
- print_liste_field_titre("Units", "", "ps.reel", "&id=".$id, "", 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("AverageUnitPricePMPShort", "", "p.pmp", "&id=".$id, "", 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("EstimatedStockValueShort", "", "", "&id=".$id, "", 'align="right"', $sortfield, $sortorder);
- if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre("SellPriceMin", "", "p.price", "&id=".$id, "", 'align="right"', $sortfield, $sortorder);
- if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre("EstimatedStockValueSellShort", "", "", "&id=".$id, "", 'align="right"', $sortfield, $sortorder);
- if ($user->rights->stock->mouvement->creer) print_liste_field_titre('');
- if ($user->rights->stock->creer) print_liste_field_titre('');
+ print_liste_field_titre("Units", "", "ps.reel", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("AverageUnitPricePMPShort", "", "p.pmp", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("EstimatedStockValueShort", "", "", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
+ if (empty($conf->global->PRODUIT_MULTIPRICES)) {
+ print_liste_field_titre("SellPriceMin", "", "p.price", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
+ }
+ if (empty($conf->global->PRODUIT_MULTIPRICES)) {
+ print_liste_field_titre("EstimatedStockValueSellShort", "", "", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
+ }
+ if ($user->rights->stock->mouvement->creer) {
+ print_liste_field_titre('');
+ }
+ if ($user->rights->stock->creer) {
+ print_liste_field_titre('');
+ }
print " \n";
$totalunit=0;
@@ -506,28 +514,28 @@ else
// Label
print ''.$objp->produit.' ';
- print '';
+ print ' ';
$valtoshow=price2num($objp->value, 'MS');
print empty($valtoshow)?'0':$valtoshow;
print ' ';
$totalunit+=$objp->value;
// Price buy PMP
- print ''.price(price2num($objp->ppmp, 'MU')).' ';
+ print ''.price(price2num($objp->ppmp, 'MU')).' ';
// Total PMP
- print ''.price(price2num($objp->ppmp*$objp->value, 'MT')).' ';
+ print ''.price(price2num($objp->ppmp*$objp->value, 'MT')).' ';
$totalvalue+=price2num($objp->ppmp*$objp->value, 'MT');
// Price sell min
if (empty($conf->global->PRODUIT_MULTIPRICES))
{
$pricemin=$objp->price;
- print '';
+ print ' ';
print price(price2num($pricemin, 'MU'), 1);
print ' ';
// Total sell min
- print '';
+ print ' ';
print price(price2num($pricemin*$objp->value, 'MT'), 1);
print ' ';
}
@@ -535,14 +543,14 @@ else
if ($user->rights->stock->mouvement->creer)
{
- print '';
+ print ' ';
print img_picto($langs->trans("StockMovement"), 'uparrow.png', 'class="hideonsmartphone"').' '.$langs->trans("StockMovement");
print " ";
}
if ($user->rights->stock->creer)
{
- print '';
+ print ' ';
print $langs->trans("StockCorrection");
print " ";
}
@@ -553,16 +561,16 @@ else
$db->free($resql);
print ''.$langs->trans("Total").' ';
- print '';
+ print ' ';
$valtoshow=price2num($totalunit, 'MS');
print empty($valtoshow)?'0':$valtoshow;
print ' ';
print ' ';
- print ''.price(price2num($totalvalue, 'MT')).' ';
+ print ''.price(price2num($totalvalue, 'MT')).' ';
if (empty($conf->global->PRODUIT_MULTIPRICES))
{
print ' ';
- print ''.price(price2num($totalvaluesell, 'MT')).' ';
+ print ''.price(price2num($totalvaluesell, 'MT')).' ';
}
print ' ';
print ' ';
diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php
index ea11974ae97..a19025b5dd6 100644
--- a/htdocs/product/stock/index.php
+++ b/htdocs/product/stock/index.php
@@ -92,7 +92,7 @@ if ($result)
print '';
print "rowid\">".img_object($langs->trans("ShowStock"), "stock")." ".$objp->label." \n";
- print ''.$entrepot->LibStatut($objp->statut, 5).' ';
+ print ''.$entrepot->LibStatut($objp->statut, 5).' ';
print " \n";
$i++;
}
@@ -142,7 +142,7 @@ if ($resql)
print ''.$langs->trans("EatByDate").' ';
}
print ''.$langs->trans("Warehouse").' ';
- print ''.$langs->trans("FullList").' ';
+ print ''.$langs->trans("FullList").' ';
print "\n";
$i=0;
@@ -170,7 +170,7 @@ if ($resql)
print '';
print img_object($langs->trans("ShowWarehouse"), "stock").' '.$objp->stock;
print " \n";
- print '';
+ print ' ';
if ($objp->qty > 0) print '+';
print $objp->qty.' ';
print "\n";
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index 95071085923..7db2dffc7db 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -162,22 +162,22 @@ if ($result)
// Lignes des champs de filtre
print '';
- print '';
+ print ' ';
print ' ';
print ' ';
- print '';
+ print ' ';
print ' ';
print ' ';
print '';
print ' ';
- print '';
+ print ' ';
print $form->selectarray('search_status', $warehouse->statuts, $search_status, 1, 0, 0, '', 1);
print ' ';
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
@@ -187,10 +187,10 @@ if ($result)
print ' ';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", $param, "", $sortfield, $sortorder);
- print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stockqty", '', $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "estimatedvalue", '', $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stockqty", '', $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "estimatedvalue", '', $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
print " \n";
@@ -213,14 +213,14 @@ if ($result)
// Location
print ''.$objp->lieu.' ';
// Stock qty
- print ''.price2num($objp->stockqty, 5).' ';
+ print ''.price2num($objp->stockqty, 5).' ';
// PMP value
- print '';
+ print ' ';
if (price2num($objp->estimatedvalue, 'MT')) print price(price2num($objp->estimatedvalue, 'MT'), 1);
else print '';
print ' ';
// Selling value
- print '';
+ print ' ';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue, 'MT'), 1);
else
{
@@ -229,7 +229,7 @@ if ($result)
}
print ' ';
// Status
- print ''.$warehouse->LibStatut($objp->statut, 5).' ';
+ print ''.$warehouse->LibStatut($objp->statut, 5).' ';
print ' ';
@@ -242,10 +242,10 @@ if ($result)
if ($totalnboflines-$offset <= $limit)
{
print '';
- print ''.$langs->trans("Total").' ';
- print ''.price2num($totalStock, 5).' ';
- print ''.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).' ';
- print '';
+ print ' '.$langs->trans("Total").' ';
+ print ''.price2num($totalStock, 5).' ';
+ print ''.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).' ';
+ print '';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency);
else
{
diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php
index 81a625f254c..bae6ff55ef7 100644
--- a/htdocs/product/stock/massstockmove.php
+++ b/htdocs/product/stock/massstockmove.php
@@ -347,14 +347,13 @@ print '';
$param='';
print '';
-print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder);
-if ($conf->productbatch->enabled)
-{
- print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder);
+print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
+if ($conf->productbatch->enabled) {
+ print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
}
-print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder);
-print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder);
-print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'align="center" class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder);
+print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
+print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
+print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'center tagtd maxwidthonsmartphone ');
print getTitleFieldOfList('', 0);
print ' ';
@@ -364,8 +363,7 @@ print '';
print '';
$filtertype=0;
if (! empty($conf->global->STOCK_SUPPORTS_SERVICES)) $filtertype='';
-if ($conf->global->PRODUIT_LIMIT_SIZE <= 0)
-{
+if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) {
$limit='';
}
else
@@ -391,9 +389,9 @@ print ' ';
print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200');
print ' ';
// Qty
-print ' ';
+print ' ';
// Button to add line
-print ' ';
+print ' ';
print ' ';
@@ -420,8 +418,8 @@ foreach($listofdata as $key => $val)
print '';
print $warehousestatict->getNomUrl(1);
print ' ';
- print ''.$val['qty'].' ';
- print ''.img_delete($langs->trans("Remove")).' ';
+ print ''.$val['qty'].' ';
+ print ''.img_delete($langs->trans("Remove")).' ';
print '';
}
diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php
index dd4bd9aa628..ba8ea43f231 100644
--- a/htdocs/product/stock/movement_card.php
+++ b/htdocs/product/stock/movement_card.php
@@ -1,9 +1,10 @@
+/* Copyright (C) 2001-2006 Rodolphe Quiedeville
* Copyright (C) 2004-2017 Laurent Destailleur
* Copyright (C) 2005-2014 Regis Houssin
* Copyright (C) 2015 Juanjo Menent
* Copyright (C) 2018 Ferran Marcet
+ * Copyright (C) 2019 Frédéric France
*
* 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
@@ -36,8 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
-if (! empty($conf->projet->enabled))
-{
+if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
}
@@ -771,7 +771,7 @@ if ($resql)
if (! empty($arrayfields['m.rowid']['checked']))
{
// Ref
- print '';
+ print ' ';
print ' ';
print ' ';
}
@@ -789,36 +789,36 @@ if ($resql)
if (! empty($arrayfields['p.ref']['checked']))
{
// Product Ref
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['p.label']['checked']))
{
// Product label
- print '';
+ print ' ';
print ' ';
print ' ';
}
// Batch
if (! empty($arrayfields['m.batch']['checked']))
{
- print ' ';
+ print ' ';
}
if (! empty($arrayfields['pl.eatby']['checked']))
{
- print '';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['pl.sellby']['checked']))
{
- print '';
+ print ' ';
print ' ';
}
// Warehouse
if (! empty($arrayfields['e.ref']['checked']))
{
- print '';
+ print ' ';
//print ' ';
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200');
print ' ';
@@ -826,28 +826,28 @@ if ($resql)
if (! empty($arrayfields['m.fk_user_author']['checked']))
{
// Author
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.inventorycode']['checked']))
{
// Inventory code
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.label']['checked']))
{
// Label of movement
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.type_mouvement']['checked']))
{
// Type of movement
- print '';
+ print ' ';
//print ' ';
print '';
print ' ';
@@ -864,21 +864,21 @@ if ($resql)
if (! empty($arrayfields['origin']['checked']))
{
// Origin of movement
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.value']['checked']))
{
// Qty
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.price']['checked']))
{
// Price
- print '';
+ print ' ';
print ' ';
print ' ';
}
@@ -904,7 +904,7 @@ if ($resql)
print ' ';
}
// Actions
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
@@ -920,13 +920,15 @@ if ($resql)
if (! empty($arrayfields['p.label']['checked']))
print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['m.batch']['checked']))
- print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['pl.eatby']['checked']))
- print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['pl.sellby']['checked']))
- print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['e.ref']['checked']))
- print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); // We are on a specific warehouse card, no filter on other should be possible
+ print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, '', $sortfield, $sortorder, 'center ');
+ if (! empty($arrayfields['e.ref']['checked'])) {
+ // We are on a specific warehouse card, no filter on other should be possible
+ print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder);
+ }
if (! empty($arrayfields['m.fk_user_author']['checked']))
print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['m.inventorycode']['checked']))
@@ -934,13 +936,13 @@ if ($resql)
if (! empty($arrayfields['m.label']['checked']))
print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['m.type_mouvement']['checked']))
- print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['origin']['checked']))
print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['m.value']['checked']))
- print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['m.price']['checked']))
- print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, '', $sortfield, $sortorder, 'right ');
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@@ -949,16 +951,19 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
- if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
+ if (! empty($arrayfields['m.datec']['checked'])) {
+ print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ }
+ if (! empty($arrayfields['m.tms']['checked'])) {
+ print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ }
+ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "\n";
$arrayofuniqueproduct=array();
- while ($i < min($num, $limit))
- {
+ while ($i < min($num, $limit)) {
$objp = $db->fetch_object($resql);
$userstatic->id=$objp->fk_user_author;
@@ -984,7 +989,7 @@ if ($resql)
$warehousestatic->lieu=$objp->lieu;
$arrayofuniqueproduct[$objp->rowid]=$objp->produit;
- if(!empty($objp->fk_origin)) {
+ if (!empty($objp->fk_origin)) {
$origin = $movement->get_origin($objp->fk_origin, $objp->origintype);
} else {
$origin = '';
@@ -994,7 +999,8 @@ if ($resql)
// Id movement
if (! empty($arrayfields['m.rowid']['checked']))
{
- print ''.$objp->mid.' '; // This is primary not movement id
+ // This is primary not movement id
+ print ''.$objp->mid.' ';
}
if (! empty($arrayfields['m.datem']['checked']))
{
@@ -1028,11 +1034,11 @@ if ($resql)
}
if (! empty($arrayfields['pl.eatby']['checked']))
{
- print ''. dol_print_date($objp->eatby, 'day') .' ';
+ print ''. dol_print_date($objp->eatby, 'day') .' ';
}
if (! empty($arrayfields['pl.sellby']['checked']))
{
- print ''. dol_print_date($objp->sellby, 'day') .' ';
+ print ''. dol_print_date($objp->sellby, 'day') .' ';
}
// Warehouse
if (! empty($arrayfields['e.ref']['checked']))
@@ -1071,16 +1077,16 @@ if ($resql)
// Type of movement
switch($objp->type_mouvement) {
case "0":
- print ''.$langs->trans('StockIncreaseAfterCorrectTransfer').' ';
+ print ''.$langs->trans('StockIncreaseAfterCorrectTransfer').' ';
break;
case "1":
- print ''.$langs->trans('StockDecreaseAfterCorrectTransfer').' ';
+ print ''.$langs->trans('StockDecreaseAfterCorrectTransfer').' ';
break;
case "2":
- print ''.$langs->trans('StockDecrease').' ';
+ print ''.$langs->trans('StockDecrease').' ';
break;
case "3":
- print ''.$langs->trans('StockIncrease').' ';
+ print ''.$langs->trans('StockIncrease').' ';
break;
}
}
@@ -1092,7 +1098,7 @@ if ($resql)
if (! empty($arrayfields['m.value']['checked']))
{
// Qty
- print '';
+ print ' ';
if ($objp->qt > 0) print '+';
print $objp->qty;
print ' ';
@@ -1100,12 +1106,12 @@ if ($resql)
if (! empty($arrayfields['m.price']['checked']))
{
// Price
- print '';
+ print ' ';
if ($objp->price != 0) print price($objp->price);
print ' ';
}
// Action column
- print '';
+ print ' ';
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected=0;
@@ -1130,8 +1136,7 @@ if ($resql)
print " ";
$productidselected=0;
- foreach ($arrayofuniqueproduct as $key => $val)
- {
+ foreach ($arrayofuniqueproduct as $key => $val) {
$productidselected=$key;
$productlabelselected=$val;
}
@@ -1143,17 +1148,17 @@ if ($resql)
//print ' ';
print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore, 'day', 'gmt'));
//print ' ';
- //print '';
+ //print ' ';
print ': '.$balancebefore;
print " \n";
//print ' ';
//print '';
print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter, 'day', 'gmt'));
//print ' ';
- //print '';
+ //print ' ';
print ': '.$balanceafter;
print " \n";
- //print ' ';
+ //print '';
}
}
else
diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php
index 0eff40ddd72..4daa8b6498f 100644
--- a/htdocs/product/stock/movement_list.php
+++ b/htdocs/product/stock/movement_list.php
@@ -4,6 +4,7 @@
* Copyright (C) 2005-2014 Regis Houssin
* Copyright (C) 2015 Juanjo Menent
* Copyright (C) 2018 Ferran Marcet
+ * Copyright (C) 2019 Frédéric France
*
* 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
@@ -768,7 +769,7 @@ if ($resql)
if (! empty($arrayfields['m.rowid']['checked']))
{
// Ref
- print '';
+ print ' ';
print ' ';
print ' ';
}
@@ -786,36 +787,36 @@ if ($resql)
if (! empty($arrayfields['p.ref']['checked']))
{
// Product Ref
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['p.label']['checked']))
{
// Product label
- print '';
+ print ' ';
print ' ';
print ' ';
}
// Batch
if (! empty($arrayfields['m.batch']['checked']))
{
- print ' ';
+ print ' ';
}
if (! empty($arrayfields['pl.eatby']['checked']))
{
- print '';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['pl.sellby']['checked']))
{
- print '';
+ print ' ';
print ' ';
}
// Warehouse
if (! empty($arrayfields['e.ref']['checked']))
{
- print '';
+ print ' ';
//print ' ';
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200');
print ' ';
@@ -823,28 +824,28 @@ if ($resql)
if (! empty($arrayfields['m.fk_user_author']['checked']))
{
// Author
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.inventorycode']['checked']))
{
// Inventory code
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.label']['checked']))
{
// Label of movement
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.type_mouvement']['checked']))
{
// Type of movement
- print '';
+ print ' ';
//print ' ';
print '';
print ' ';
@@ -861,21 +862,21 @@ if ($resql)
if (! empty($arrayfields['origin']['checked']))
{
// Origin of movement
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.value']['checked']))
{
// Qty
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['m.price']['checked']))
{
// Price
- print '';
+ print ' ';
print ' ';
print ' ';
}
@@ -901,28 +902,59 @@ if ($resql)
print ' ';
}
// Actions
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
print "\n";
print '';
- if (! empty($arrayfields['m.rowid']['checked'])) print_liste_field_titre($arrayfields['m.rowid']['label'], $_SERVER["PHP_SELF"], 'm.rowid', '', $param, '', $sortfield, $sortorder);
- if (! empty($arrayfields['m.datem']['checked'])) print_liste_field_titre($arrayfields['m.datem']['label'], $_SERVER["PHP_SELF"], 'm.datem', '', $param, '', $sortfield, $sortorder);
- if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder);
- if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder);
- if (! empty($arrayfields['m.batch']['checked'])) print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['pl.eatby']['checked'])) print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['pl.sellby']['checked'])) print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['e.ref']['checked'])) print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); // We are on a specific warehouse card, no filter on other should be possible
- if (! empty($arrayfields['m.fk_user_author']['checked'])) print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['m.inventorycode']['checked'])) print_liste_field_titre($arrayfields['m.inventorycode']['label'], $_SERVER["PHP_SELF"], "m.inventorycode", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['m.label']['checked'])) print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['m.type_mouvement']['checked'])) print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['origin']['checked'])) print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['m.value']['checked'])) print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['m.price']['checked'])) print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, 'align="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['m.rowid']['checked'])) {
+ print_liste_field_titre($arrayfields['m.rowid']['label'], $_SERVER["PHP_SELF"], 'm.rowid', '', $param, '', $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['m.datem']['checked'])) {
+ print_liste_field_titre($arrayfields['m.datem']['label'], $_SERVER["PHP_SELF"], 'm.datem', '', $param, '', $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['p.ref']['checked'])) {
+ print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['p.label']['checked'])) {
+ print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['m.batch']['checked'])) {
+ print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, '', $sortfield, $sortorder, 'center ');
+ }
+ if (! empty($arrayfields['pl.eatby']['checked'])) {
+ print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, '', $sortfield, $sortorder, 'center ');
+ }
+ if (! empty($arrayfields['pl.sellby']['checked'])) {
+ print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, '', $sortfield, $sortorder, 'center ');
+ }
+ if (! empty($arrayfields['e.ref']['checked'])) {
+ // We are on a specific warehouse card, no filter on other should be possible
+ print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder);
+
+ if (! empty($arrayfields['m.fk_user_author']['checked'])) {
+ print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['m.inventorycode']['checked'])) {
+ print_liste_field_titre($arrayfields['m.inventorycode']['label'], $_SERVER["PHP_SELF"], "m.inventorycode", "", $param, "", $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['m.label']['checked'])) {
+ print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['m.type_mouvement']['checked'])) {
+ print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center ');
+ }
+ if (! empty($arrayfields['origin']['checked'])) {
+ print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
+ }
+ if (! empty($arrayfields['m.value']['checked'])) {
+ print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
+ if (! empty($arrayfields['m.price']['checked'])) {
+ print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, '', $sortfield, $sortorder, 'right ');
+ }
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@@ -931,9 +963,13 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
- if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
+ if (! empty($arrayfields['m.datec']['checked'])) {
+ print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ }
+ if (! empty($arrayfields['m.tms']['checked'])) {
+ print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ }
+ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print " \n";
@@ -1010,11 +1046,11 @@ if ($resql)
}
if (! empty($arrayfields['pl.eatby']['checked']))
{
- print ''. dol_print_date($objp->eatby, 'day') .' ';
+ print ''. dol_print_date($objp->eatby, 'day') .' ';
}
if (! empty($arrayfields['pl.sellby']['checked']))
{
- print ''. dol_print_date($objp->sellby, 'day') .' ';
+ print ''. dol_print_date($objp->sellby, 'day') .' ';
}
// Warehouse
if (! empty($arrayfields['e.ref']['checked']))
@@ -1053,16 +1089,16 @@ if ($resql)
// Type of movement
switch($objp->type_mouvement){
case "0":
- print ''.$langs->trans('StockIncreaseAfterCorrectTransfer').' ';
+ print ''.$langs->trans('StockIncreaseAfterCorrectTransfer').' ';
break;
case "1":
- print ''.$langs->trans('StockDecreaseAfterCorrectTransfer').' ';
+ print ''.$langs->trans('StockDecreaseAfterCorrectTransfer').' ';
break;
case "2":
- print ''.$langs->trans('StockDecrease').' ';
+ print ''.$langs->trans('StockDecrease').' ';
break;
case "3":
- print ''.$langs->trans('StockIncrease').' ';
+ print ''.$langs->trans('StockIncrease').' ';
break;
}
}
@@ -1074,7 +1110,7 @@ if ($resql)
if (! empty($arrayfields['m.value']['checked']))
{
// Qty
- print '';
+ print ' ';
if ($objp->qt > 0) print '+';
print $objp->qty;
print ' ';
@@ -1082,12 +1118,12 @@ if ($resql)
if (! empty($arrayfields['m.price']['checked']))
{
// Price
- print '';
+ print ' ';
if ($objp->price != 0) print price($objp->price);
print ' ';
}
// Action column
- print '';
+ print ' ';
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected=0;
@@ -1125,14 +1161,14 @@ if ($resql)
//print ' ';
print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore, 'day', 'gmt'));
//print ' ';
- //print '';
+ //print ' ';
print ': '.$balancebefore;
print " \n";
//print ' ';
//print '';
print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter, 'day', 'gmt'));
//print ' ';
- //print '';
+ //print ' ';
print ': '.$balanceafter;
print " \n";
//print ' ';
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 71f450d8c73..2c0515d309c 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -1,14 +1,14 @@
- * Copyright (C) 2004-2015 Laurent Destailleur
+ * Copyright (C) 2004-2015 Laurent Destailleur
* Copyright (C) 2004 Eric Seigne
* Copyright (C) 2005 Simon TOSSER
* Copyright (C) 2005-2009 Regis Houssin
* Copyright (C) 2013 Cédric Salvador
* Copyright (C) 2013-2018 Juanjo Menent
* Copyright (C) 2014-2015 Cédric Gross
- * Copyright (C) 2015 Marcos García
- * Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2015 Marcos García
+ * Copyright (C) 2018-2019 Frédéric France
*
* 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
@@ -38,9 +38,10 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productstockentrepot.class.php';
-if (! empty($conf->productbatch->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php';
-if (! empty($conf->projet->enabled))
-{
+if (! empty($conf->productbatch->enabled)) {
+ require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php';
+}
+if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
}
@@ -807,17 +808,17 @@ if (! $variants) {
print '';
print '';
print '' . $langs->trans("Warehouse") . ' ';
- print '' . $langs->trans("NumberOfUnit") . ' ';
- print '' . $langs->trans("AverageUnitPricePMPShort") . ' ';
- print '' . $langs->trans("EstimatedStockValueShort") . ' ';
- print '' . $langs->trans("SellPriceMin") . ' ';
- print '' . $langs->trans("EstimatedStockValueSellShort") . ' ';
+ print '' . $langs->trans("NumberOfUnit") . ' ';
+ print '' . $langs->trans("AverageUnitPricePMPShort") . ' ';
+ print '' . $langs->trans("EstimatedStockValueShort") . ' ';
+ print '' . $langs->trans("SellPriceMin") . ' ';
+ print '' . $langs->trans("EstimatedStockValueSellShort") . ' ';
print ' ';
if ((!empty($conf->productbatch->enabled)) && $object->hasbatch()) {
print ' ';
- print '' . $langs->trans("batch_number") . ' ';
- print '' . $langs->trans("EatByDate") . ' ';
- print '' . $langs->trans("SellByDate") . ' ';
+ print '' . $langs->trans("batch_number") . ' ';
+ print '' . $langs->trans("EatByDate") . ' ';
+ print '' . $langs->trans("SellByDate") . ' ';
print ' ';
print ' ';
print ' ';
@@ -856,18 +857,18 @@ if (! $variants) {
$stock_real = price2num($obj->reel, 'MS');
print '';
print '' . $entrepotstatic->getNomUrl(1) . ' ';
- print '' . $stock_real . ($stock_real < 0 ? ' ' . img_warning() : '') . ' ';
+ print '' . $stock_real . ($stock_real < 0 ? ' ' . img_warning() : '') . ' ';
// PMP
- print '' . (price2num($object->pmp) ? price2num($object->pmp, 'MU') : '') . ' ';
+ print '' . (price2num($object->pmp) ? price2num($object->pmp, 'MU') : '') . ' ';
// Value purchase
- print '' . (price2num($object->pmp) ? price(price2num($object->pmp * $obj->reel, 'MT')) : '') . ' ';
+ print '' . (price2num($object->pmp) ? price(price2num($object->pmp * $obj->reel, 'MT')) : '') . ' ';
// Sell price
- print '';
+ print ' ';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price, 'MU'), 1);
else print $langs->trans("Variable");
print ' ';
// Value sell
- print '';
+ print ' ';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price * $obj->reel, 'MT'), 1) . ' ';
else print $langs->trans("Variable");
print ' ';
@@ -890,33 +891,33 @@ if (! $variants) {
print '';
print '';
print ' ';
} else {
- print "\n" . '';
+ print "\n" . ' ';
print img_picto($langs->trans("Tranfer"), 'uparrow', 'class="hideonsmartphone"') . ' ';
print 'id . '&id_entrepot=' . $entrepotstatic->id . '&action=transfert&pdluoid=' . $pdluo->id . '">' . $langs->trans("TransferStock") . ' ';
// Disabled, because edition of stock content must use the "Correct stock menu".
// Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ...
//print 'id.'#'.$pdluo->id.'">';
//print img_edit().' ';
- print '';
+ print ' ';
print $product_lot_static->getNomUrl(1);
print ' ';
- print '' . dol_print_date($pdluo->eatby, 'day') . ' ';
- print '' . dol_print_date($pdluo->sellby, 'day') . ' ';
- print '' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . ' ';
+ print '' . dol_print_date($pdluo->eatby, 'day') . ' ';
+ print '' . dol_print_date($pdluo->sellby, 'day') . ' ';
+ print '' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . ' ';
print ' ';
}
}
@@ -925,21 +926,21 @@ if (! $variants) {
}
} else dol_print_error($db);
- print '' . $langs->trans("Total") . ': ';
- print '' . price2num($total, 'MS') . ' ';
- print '';
+ print ' ' . $langs->trans("Total") . ': ';
+ print '' . price2num($total, 'MS') . ' ';
+ print '';
print ($totalwithpmp ? price(price2num($totalvalue / $totalwithpmp, 'MU')) : ' '); // This value may have rounding errors
print ' ';
// Value purchase
- print '';
+ print ' ';
print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : ' ';
print ' ';
- print '';
+ print ' ';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : ' ');
else print $langs->trans("Variable");
print ' ';
// Value to sell
- print '';
+ print ' ';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1);
else print $langs->trans("Variable");
print ' ';
@@ -959,14 +960,14 @@ if (! $variants) {
print '';
if (!empty($user->rights->produit->creer)) {
print '' . $formproduct->selectWarehouses('', 'fk_entrepot') . ' ';
- print ' ';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
print ' ';
} else {
print '' . $langs->trans("Warehouse") . ' ';
- print '' . $langs->trans("StockLimit") . ' ';
- print '' . $langs->trans("DesiredStock") . ' ';
+ print '' . $langs->trans("StockLimit") . ' ';
+ print '' . $langs->trans("DesiredStock") . ' ';
print ' ';
}
@@ -979,10 +980,10 @@ if (! $variants) {
$ent = new Entrepot($db);
$ent->fetch($line['fk_entrepot']);
print '' . $ent->getNomUrl(3) . ' ';
- print '' . $line['seuil_stock_alerte'] . ' ';
- print '' . $line['desiredstock'] . ' ';
+ print '' . $line['seuil_stock_alerte'] . ' ';
+ print '' . $line['desiredstock'] . ' ';
if (!empty($user->rights->produit->creer)) {
- print '' . img_delete() . ' ';
+ print '' . img_delete() . ' ';
}
print ' ';
}
@@ -1064,8 +1065,8 @@ if (! $variants) {
}
print '';
- print ''.$langs->trans("Total").' ';
- print ''.$stock_total.' ';
+ print ''.$langs->trans("Total").' ';
+ print ''.$stock_total.' ';
print ' ';
}
else
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index 54243e3c853..7105470032c 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -1,6 +1,7 @@
- * Copyright (C) 2018 Ferran Marcet
+/* Copyright (C) 2007-2016 Laurent Destailleur
+ * Copyright (C) 2018 Ferran Marcet
+ * Copyright (C) 2019 Frédéric France
*
* 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
@@ -17,10 +18,10 @@
*/
/**
- * \file product/stock/productlot_list.php
- * \ingroup stock
- * \brief This file is an example of a php page
- * Initialy built by build_class_from_table on 2016-05-17 12:22
+ * \file product/stock/productlot_list.php
+ * \ingroup stock
+ * \brief This file is an example of a php page
+ * Initialy built by build_class_from_table on 2016-05-17 12:22
*/
require '../../main.inc.php';
@@ -34,10 +35,10 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
$langs->loadLangs(array('stocks', 'productbatch', 'other', 'users'));
// Get parameters
-$id = GETPOST('id', 'int');
-$action = GETPOST('action', 'alpha');
+$id = GETPOST('id', 'int');
+$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
-$myparam = GETPOST('myparam', 'alpha');
+$myparam = GETPOST('myparam', 'alpha');
$toselect = GETPOST('toselect', 'array');
@@ -362,12 +363,12 @@ if ($resql)
/*if (! empty($arrayfields['u.statut']['checked']))
{
// Status
- print '';
+ print ' ';
print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
print ' ';
}*/
// Action column
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto;
print ' ';
@@ -389,11 +390,17 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
- if (! empty($arrayfields['t.datec']['checked'])) print_liste_field_titre($arrayfields['t.datec']['label'], $_SERVER["PHP_SELF"], "t.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER["PHP_SELF"], "t.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- //if (! empty($arrayfields['t.status']['checked'])) print_liste_field_titre($arrayfields['t.status']['label'],$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder);
- print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
- print ''."\n";
+ if (! empty($arrayfields['t.datec']['checked'])) {
+ print_liste_field_titre($arrayfields['t.datec']['label'], $_SERVER["PHP_SELF"], "t.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ }
+ if (! empty($arrayfields['t.tms']['checked'])) {
+ print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER["PHP_SELF"], "t.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ }
+ //if (! empty($arrayfields['t.status']['checked'])) {
+ // print_liste_field_titre($arrayfields['t.status']['label'], $_SERVER["PHP_SELF"], "t.status", "", $param, '', $sortfield, $sortorder, 'center ');
+ //}
+ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
+ print ''."\n";
$productlot = new Productlot($db);
@@ -464,7 +471,7 @@ if ($resql)
// Date creation
if (! empty($arrayfields['t.datec']['checked']))
{
- print '';
+ print ' ';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print ' ';
if (! $i) $totalarray['nbfield']++;
@@ -472,7 +479,7 @@ if ($resql)
// Date modification
if (! empty($arrayfields['t.tms']['checked']))
{
- print '';
+ print ' ';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print ' ';
if (! $i) $totalarray['nbfield']++;
@@ -482,11 +489,11 @@ if ($resql)
if (! empty($arrayfields['u.statut']['checked']))
{
$userstatic->statut=$obj->statut;
- print ''.$userstatic->getLibStatut(3).' ';
+ print ''.$userstatic->getLibStatut(3).' ';
}*/
// Action column
- print '';
+ print ' ';
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected=0;
@@ -514,9 +521,9 @@ if ($resql)
if ($num < $limit && empty($offset)) print ' '.$langs->trans("Total").' ';
else print ''.$langs->trans("Totalforthispage").' ';
}
- elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' ';
- elseif ($totalarray['totalvatfield'] == $i) print ''.price($totalarray['totalvat']).' ';
- elseif ($totalarray['totalttcfield'] == $i) print ''.price($totalarray['totalttc']).' ';
+ elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' ';
+ elseif ($totalarray['totalvatfield'] == $i) print ''.price($totalarray['totalvat']).' ';
+ elseif ($totalarray['totalttcfield'] == $i) print ''.price($totalarray['totalttc']).' ';
else print ' ';
}
print '';
diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php
index 829df2a076a..7bd080b15bf 100644
--- a/htdocs/product/stock/replenish.php
+++ b/htdocs/product/stock/replenish.php
@@ -4,6 +4,7 @@
* Copyright (C) 2014 Regis Houssin
* Copyright (C) 2016 Juanjo Menent
* Copyright (C) 2016 ATM Consulting
+ * Copyright (C) 2019 Frédéric France
*
* 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
@@ -534,11 +535,11 @@ print ' ';
if (!empty($conf->service->enabled) && $type == 1) print ' ';
print ' ';
-print ' ';
-print '' . $langs->trans('AlertOnly') . ' ';
-print '' . $langs->trans('IncludeAlsoDraftOrders') . ' ';
+print ' ';
+print '' . $langs->trans('AlertOnly') . ' ';
+print '' . $langs->trans('IncludeAlsoDraftOrders') . ' ';
print ' ';
-print '';
+print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
@@ -549,13 +550,13 @@ print '';
print_liste_field_titre(' ', $_SERVER["PHP_SELF"], '');
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', $param, '', '', $sortfield, $sortorder);
print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', $param, '', '', $sortfield, $sortorder);
-if (!empty($conf->service->enabled) && $type == 1) print_liste_field_titre('Duration', $_SERVER["PHP_SELF"], 'p.duration', $param, '', 'align="center"', $sortfield, $sortorder);
-print_liste_field_titre('DesiredStock', $_SERVER["PHP_SELF"], 'p.desiredstock', $param, '', 'align="right"', $sortfield, $sortorder);
-print_liste_field_titre('StockLimitShort', $_SERVER["PHP_SELF"], 'p.seuil_stock_alerte', $param, '', 'align="right"', $sortfield, $sortorder);
-print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', 'align="right"', $sortfield, $sortorder);
-print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
-print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
-print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
+if (!empty($conf->service->enabled) && $type == 1) print_liste_field_titre('Duration', $_SERVER["PHP_SELF"], 'p.duration', $param, '', '', $sortfield, $sortorder, 'center ');
+print_liste_field_titre('DesiredStock', $_SERVER["PHP_SELF"], 'p.desiredstock', $param, '', '', $sortfield, $sortorder, 'right ');
+print_liste_field_titre('StockLimitShort', $_SERVER["PHP_SELF"], 'p.seuil_stock_alerte', $param, '', '', $sortfield, $sortorder, 'right ');
+print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', '', $sortfield, $sortorder, 'right ');
+print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
+print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
+print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
print " \n";
while ($i < ($limit ? min($num, $limit) : $num))
@@ -660,27 +661,27 @@ while ($i < ($limit ? min($num, $limit) : $num))
} else {
$duration = $objp->duration;
}
- print ''.$duration.' ';
+ print ''.$duration.' ';
}
// Desired stock
- print '' . $desiredstock . ' ';
+ print '' . $desiredstock . ' ';
// Limit stock for alert
- print '' . $alertstock . ' ';
+ print '' . $alertstock . ' ';
// Current stock (all warehouses)
- print ''. $warning . $stock. ' ';
+ print ''. $warning . $stock. ' ';
// Already ordered
- print ''. $ordered . ' ' . $picto. ' ';
+ print ''. $ordered . ' ' . $picto. ' ';
// To order
- //print ' ';
- print ' ';
+ //print ' ';
+ print ' ';
// Supplier
- print ''. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).' ';
+ print ''. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).' ';
print '';
}
diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php
index 40119d91c65..617d40b5232 100644
--- a/htdocs/product/stock/replenishorders.php
+++ b/htdocs/product/stock/replenishorders.php
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2013 Cédric Salvador
* Copyright (C) 2014 Regis Houssin
- * Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2018-2019 Frédéric France
*
* 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
@@ -198,7 +198,7 @@ if ($resql)
''.
$form->selectDate($search_date, 'search_date', 0, 0, 1, '', 1, 0, 0, '').
' '.
- '';
+ ' ';
$searchpicto = $form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
@@ -261,9 +261,10 @@ if ($resql)
'cf.fk_statut',
'',
$param,
- 'align="right"',
+ '',
$sortfield,
- $sortorder
+ $sortorder,
+ 'right '
);
print '';
@@ -277,13 +278,12 @@ if ($resql)
if ($showline)
{
- $href = DOL_URL_ROOT . '/fourn/commande/card.php?id=' . $obj->rowid;
- print ''.
+ $href = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$obj->rowid;
+ print ' ';
// Ref
- ''.
- ''.
- img_object($langs->trans('ShowOrder'), 'order') . ' ' . $obj->ref.
- ' ';
+ print '';
+ print ''.img_object($langs->trans('ShowOrder'), 'order').' '.$obj->ref.' ';
+ print ' ';
// Company
$href = DOL_URL_ROOT . '/fourn/card.php?socid=' . $obj->socid;
@@ -300,13 +300,9 @@ if ($resql)
} else {
$txt = ' ';
}
- print ''.
- $txt.
- ' '.
+ print ''.$txt.' ';
// Amount
- ''.
- price($obj->total_ttc).
- ' ';
+ print ''.price($obj->total_ttc).' ';
// Date
if ($obj->dc) {
@@ -314,14 +310,10 @@ if ($resql)
} else {
$date = '-';
}
- print ''.
- $date.
- ' '.
+ print ''.$date.' ';
// Statut
- ''.
- $commandestatic->LibStatut($obj->fk_statut, 5).
- ' '.
- ' ';
+ print ''.$commandestatic->LibStatut($obj->fk_statut, 5).' ';
+ print '';
}
$i++;
}
@@ -334,7 +326,7 @@ if ($resql)
}
else
{
- dol_print_error($db);
+ dol_print_error($db);
}
// End of page
diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php
index 1bc9ffbb018..6bfdb67f068 100644
--- a/htdocs/product/stock/valo.php
+++ b/htdocs/product/stock/valo.php
@@ -87,9 +87,9 @@ if ($result)
print "";
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", "", "", $sortfield, $sortorder);
- print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "e.valo_pmp", '', '', 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', '', 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', '', 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "e.valo_pmp", '', '', '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', '', '', $sortfield, $sortorder, 'right ');
print " \n";
if ($num)
@@ -104,17 +104,17 @@ if ($result)
print ''.img_object($langs->trans("ShowWarehouse"), 'stock').' '.$objp->ref.' ';
print ''.$objp->lieu.' ';
// PMP value
- print '';
+ print ' ';
if (price2num($objp->estimatedvalue, 'MT')) print price(price2num($objp->estimatedvalue, 'MT'), 1);
else print '';
print ' ';
// Selling value
- print '';
+ print ' ';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue, 'MT'), 1);
else print $langs->trans("Variable");
print ' ';
// Status
- print ''.$entrepot->LibStatut($objp->statut, 5).' ';
+ print ''.$entrepot->LibStatut($objp->statut, 5).' ';
print "\n";
$total += price2num($objp->estimatedvalue, 'MU');
$totalsell += price2num($objp->sellvalue, 'MU');
@@ -123,10 +123,10 @@ if ($result)
}
print '';
- print ''.$langs->trans("Total").' ';
- print ''.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).' ';
- print ''.price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).' ';
- print ' ';
+ print ''.$langs->trans("Total").' ';
+ print ''.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).' ';
+ print ''.price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).' ';
+ print ' ';
print " \n";
}