From c2518e92fbb26ce077cb33500965b6cc77528ea8 Mon Sep 17 00:00:00 2001
From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com>
Date: Mon, 26 Oct 2020 11:50:04 +0100
Subject: [PATCH] NEW: ref in product customer price: add field in views
---
htdocs/product/price.php | 9 ++++++---
htdocs/societe/price.php | 8 ++++++--
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index 8d10535ae31..2444fe6468d 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -1854,6 +1854,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '
';
print '| '.$langs->trans("ThirdParty").' | ';
+ print ''.$langs->trans('RefCustomer').' | ';
print ''.$langs->trans("AppliedPricesFrom").' | ';
print ''.$langs->trans("PriceBase").' | ';
print ''.$langs->trans("DefaultTaxRate").' | ';
@@ -1901,6 +1902,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '
';
print "| ".$staticsoc->getNomUrl(1)." | ";
+ print '' . $line->ref_customer . ' | ';
print "".dol_print_date($line->datec, "dayhour")." | ";
print ''.$langs->trans($line->price_base_type)." | ";
print '';
@@ -1969,7 +1971,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
if (count($prodcustprice->lines) > 0 || $search_soc)
{
- $colspan = 8;
+ $colspan = 9;
//if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") $colspan++;
print ' |
';
@@ -1985,6 +1987,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '
';
print '| '.$langs->trans("ThirdParty").' | ';
+ print '' . $langs->trans('RefCustomer') . ' | ';
print ''.$langs->trans("AppliedPricesFrom").' | ';
print ''.$langs->trans("PriceBase").' | ';
print ''.$langs->trans("DefaultTaxRate").' | ';
@@ -2023,8 +2026,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
$total_ttc = $resultarray[2];
print '
';
- print "| ".$langs->trans("Default")." | ";
- print " | ";
+ print '' . $langs->trans('Default') . ' | ';
print ''.$langs->trans($object->price_base_type)." | ";
print '';
@@ -2102,6 +2104,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print ' |
';
print "| ".$staticsoc->getNomUrl(1)." | ";
+ print '' . $line->ref_customer . ' | ';
print "".dol_print_date($line->datec, "dayhour")." | ";
print ''.$langs->trans($line->price_base_type)." | ";
diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php
index 8a65b56b2bf..2275ab251f7 100644
--- a/htdocs/societe/price.php
+++ b/htdocs/societe/price.php
@@ -461,6 +461,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '
';
print '| '.$langs->trans("Product").' | ';
+ print '' . $langs->trans('RefCustomer') . ' | ';
print ''.$langs->trans("AppliedPricesFrom").' | ';
print ''.$langs->trans("PriceBase").' | ';
print ''.$langs->trans("VAT").' | ';
@@ -478,6 +479,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
$staticprod->fetch($line->fk_product);
print "".$staticprod->getNomUrl(1)." | ";
+ print '' . $line->ref_customer . ' | ';
print "".dol_print_date($line->datec, "dayhour")." | ";
print ''.$langs->trans($line->price_base_type)." | ";
@@ -547,6 +549,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '
';
print '| ' . $langs->trans("Ref") . ' | ';
print '' . $langs->trans("Product") . ' | ';
+ print '' . $langs->trans('RefCustomer') . ' | ';
print ''.$langs->trans("AppliedPricesFrom").' | ';
print ''.$langs->trans("PriceBase").' | ';
print ''.$langs->trans("VAT").' | ';
@@ -563,7 +566,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '
';
print ' | ';
print ' | ';
- print ' | ';
+ print ' | ';
print ' | ';
print ' | ';
print ' | ';
@@ -586,6 +589,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print "".$staticprod->getNomUrl(1)." | ";
print "" . $staticprod->label ." | ";
+ print '' . $line->ref_customer .' | ';
print "".dol_print_date($line->datec, "dayhour")." | ";
print ''.$langs->trans($line->price_base_type)." | ";
@@ -623,7 +627,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print "
\n";
}
} else {
- $colspan = 9;
+ $colspan = 10;
if ($user->rights->produit->supprimer || $user->rights->service->supprimer) $colspan += 1;
print '| '.$langs->trans('None').' |
';
}