Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/comm/propal/class/propal.class.php htdocs/compta/facture/fiche-rec.php htdocs/core/class/commonobject.class.php htdocs/core/modules/import/import_xlsx.modules.php htdocs/install/repair.php
This commit is contained in:
commit
c85acbfc11
@ -105,7 +105,7 @@ JQUERYFILETREE:
|
||||
RESTLER:
|
||||
--------
|
||||
|
||||
* Add 2 lines into function
|
||||
* Add 2 lines into file AutoLoader.php to complete function
|
||||
private function alias($className, $currentClass)
|
||||
{
|
||||
...
|
||||
|
||||
@ -114,10 +114,13 @@ switch($action)
|
||||
{
|
||||
if (count($prodcustprice->lines) > 0)
|
||||
{
|
||||
$pu_ht = price($prodcustprice->lines [0]->price);
|
||||
$pu_ttc = price($prodcustprice->lines [0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines [0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines [0]->tva_tx;
|
||||
$pu_ht = price($prodcustprice->lines[0]->price);
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
||||
if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) $tva_npr=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -1324,6 +1324,8 @@ if ($id > 0)
|
||||
print '</div>';
|
||||
if ($object->datep != $object->datef && in_array($user->id,array_keys($listofuserid)))
|
||||
{
|
||||
//var_dump($object->userassigned);
|
||||
//var_dump($listofuserid);
|
||||
print '<div class="myavailability">';
|
||||
print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody
|
||||
print '</div>';
|
||||
|
||||
@ -225,11 +225,11 @@ class ActionComm extends CommonObject
|
||||
if ($this->elementtype=='commande') $this->elementtype='order';
|
||||
if ($this->elementtype=='contrat') $this->elementtype='contract';
|
||||
|
||||
if (! is_array($this->userassigned) && ! empty($this->userassigned)) // For backward compatibility
|
||||
if (! is_array($this->userassigned) && ! empty($this->userassigned)) // For backward compatibility when userassigned was an int instead fo array
|
||||
{
|
||||
$tmpid=$this->userassigned;
|
||||
$this->userassigned=array();
|
||||
$this->userassigned[$tmpid]=array('id'=>$tmpid);
|
||||
$this->userassigned[$tmpid]=array('id'=>$tmpid, 'transparency'=>$this->transparency);
|
||||
}
|
||||
|
||||
if (is_object($this->contact) && isset($this->contact->id) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated
|
||||
@ -240,7 +240,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
// Be sure assigned user is defined as an array of array('id'=>,'mandatory'=>,...).
|
||||
if (empty($this->userassigned) || count($this->userassigned) == 0 || ! is_array($this->userassigned))
|
||||
$this->userassigned = array($userownerid=>array('id'=>$userownerid));
|
||||
$this->userassigned = array($userownerid=>array('id'=>$userownerid, 'transparency'=>$this->transparency));
|
||||
|
||||
if (! $this->type_id || ! $this->type_code)
|
||||
{
|
||||
|
||||
@ -808,6 +808,9 @@ if (empty($reshook))
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx . ' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
|
||||
if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) $tva_npr=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -364,42 +364,42 @@ class Propal extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a proposal line into database (linked to product/service or not)
|
||||
* The parameters are already supposed to be appropriate and with final values to the call
|
||||
* of this method. Also, for the VAT rate, it must have already been defined
|
||||
* by whose calling the method get_default_tva (societe_vendeuse, societe_acheteuse, '' product)
|
||||
* and desc must already have the right value (it's up to the caller to manage multilanguage)
|
||||
*
|
||||
* @param string $desc Description de la ligne
|
||||
* @param float $pu_ht Prix unitaire
|
||||
* @param float $qty Quantite
|
||||
* @param float $txtva Taux de tva
|
||||
* @param float $txlocaltax1 Local tax 1 rate
|
||||
* @param float $txlocaltax2 Local tax 2 rate
|
||||
* @param int $fk_product Id du produit/service predefini
|
||||
* @param float $remise_percent Pourcentage de remise de la ligne
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param float $pu_ttc Prix unitaire TTC
|
||||
* @param int $info_bits Bits de type de lignes
|
||||
* @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used.
|
||||
* @param int $rang Position of line
|
||||
* @param int $special_code Special code (also used by externals modules!)
|
||||
* @param int $fk_parent_line Id of parent line
|
||||
* @param int $fk_fournprice Id supplier price
|
||||
* @param int $pa_ht Buying price without tax
|
||||
* @param string $label ???
|
||||
* @param int $date_start Start date of the line
|
||||
* @param int $date_end End date of the line
|
||||
* @param array $array_options extrafields array
|
||||
* @param string $fk_unit Code of the unit to use. Null to use the default one
|
||||
* @param string $origin 'order', ...
|
||||
* @param int $origin_id Id of origin object
|
||||
* @param double $pu_ht_devise Unit price in currency
|
||||
* @param int $fk_remise_except Id discount if line is from a discount
|
||||
* @return int >0 if OK, <0 if KO
|
||||
* @see add_product
|
||||
*/
|
||||
/**
|
||||
* Add a proposal line into database (linked to product/service or not)
|
||||
* The parameters are already supposed to be appropriate and with final values to the call
|
||||
* of this method. Also, for the VAT rate, it must have already been defined
|
||||
* by whose calling the method get_default_tva (societe_vendeuse, societe_acheteuse, '' product)
|
||||
* and desc must already have the right value (it's up to the caller to manage multilanguage)
|
||||
*
|
||||
* @param string $desc Description of line
|
||||
* @param float $pu_ht Unit price
|
||||
* @param float $qty Quantity
|
||||
* @param float $txtva Force Vat rate, -1 for auto (Can contain the vat_src_code too with syntax '9.9 (CODE)')
|
||||
* @param float $txlocaltax1 Local tax 1 rate (deprecated, use instead txtva with code inside)
|
||||
* @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside)
|
||||
* @param int $fk_product Id du produit/service predefini
|
||||
* @param float $remise_percent Pourcentage de remise de la ligne
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param float $pu_ttc Prix unitaire TTC
|
||||
* @param int $info_bits Bits de type de lignes
|
||||
* @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used.
|
||||
* @param int $rang Position of line
|
||||
* @param int $special_code Special code (also used by externals modules!)
|
||||
* @param int $fk_parent_line Id of parent line
|
||||
* @param int $fk_fournprice Id supplier price
|
||||
* @param int $pa_ht Buying price without tax
|
||||
* @param string $label ???
|
||||
* @param int $date_start Start date of the line
|
||||
* @param int $date_end End date of the line
|
||||
* @param array $array_options extrafields array
|
||||
* @param string $fk_unit Code of the unit to use. Null to use the default one
|
||||
* @param string $origin 'order', ...
|
||||
* @param int $origin_id Id of origin object
|
||||
* @param double $pu_ht_devise Unit price in currency
|
||||
* @param int $fk_remise_except Id discount if line is from a discount
|
||||
* @return int >0 if OK, <0 if KO
|
||||
* @see add_product
|
||||
*/
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0, $pu_ht_devise=0, $fk_remise_except=0)
|
||||
{
|
||||
global $mysoc, $conf, $langs;
|
||||
@ -1018,11 +1018,15 @@ class Propal extends CommonObject
|
||||
$fk_parent_line = 0;
|
||||
}
|
||||
|
||||
// Complete vat rate with code
|
||||
$vatrate = $this->lines[$i]->tva_tx;
|
||||
if ($this->lines[$i]->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$this->lines[$i]->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$this->lines[$i]->desc,
|
||||
$this->lines[$i]->subprice,
|
||||
$this->lines[$i]->qty,
|
||||
$this->lines[$i]->tva_tx,
|
||||
$vatrate,
|
||||
$this->lines[$i]->localtax1_tx,
|
||||
$this->lines[$i]->localtax2_tx,
|
||||
$this->lines[$i]->fk_product,
|
||||
@ -1234,7 +1238,6 @@ class Propal extends CommonObject
|
||||
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $clonedObj->ref_client = '';
|
||||
|
||||
// Create clone
|
||||
|
||||
$result=$clonedObj->create($user);
|
||||
if ($result < 0) $error++;
|
||||
else
|
||||
|
||||
@ -761,10 +761,13 @@ if (empty($reshook))
|
||||
{
|
||||
if (count($prodcustprice->lines) > 0)
|
||||
{
|
||||
$pu_ht = price($prodcustprice->lines [0]->price);
|
||||
$pu_ttc = price($prodcustprice->lines [0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines [0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines [0]->tva_tx;
|
||||
$pu_ht = price($prodcustprice->lines[0]->price);
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
||||
if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) $tva_npr=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -824,11 +824,15 @@ class Commande extends CommonOrder
|
||||
$fk_parent_line = 0;
|
||||
}
|
||||
|
||||
// Complete vat rate with code
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
$line->tva_tx,
|
||||
$vatrate,
|
||||
$line->localtax1_tx,
|
||||
$line->localtax2_tx,
|
||||
$line->fk_product,
|
||||
@ -1215,9 +1219,9 @@ class Commande extends CommonOrder
|
||||
* @param string $desc Description of line
|
||||
* @param float $pu_ht Unit price (without tax)
|
||||
* @param float $qty Quantite
|
||||
* @param float $txtva Taux de tva force, sinon -1
|
||||
* @param float $txlocaltax1 Local tax 1 rate
|
||||
* @param float $txlocaltax2 Local tax 2 rate
|
||||
* @param float $txtva Force Vat rate, -1 for auto (Can contain the vat_src_code too with syntax '9.9 (CODE)')
|
||||
* @param float $txlocaltax1 Local tax 1 rate (deprecated, use instead txtva with code inside)
|
||||
* @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside)
|
||||
* @param int $fk_product Id of product
|
||||
* @param float $remise_percent Pourcentage de remise de la ligne
|
||||
* @param int $info_bits Bits de type de lignes
|
||||
|
||||
@ -1655,6 +1655,9 @@ if (empty($reshook))
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
||||
if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) $tva_npr=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -583,11 +583,15 @@ class Facture extends CommonInvoice
|
||||
$fk_parent_line = 0;
|
||||
}
|
||||
|
||||
// Complete vat rate with code
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
$line->tva_tx,
|
||||
$vatrate,
|
||||
$line->localtax1_tx,
|
||||
$line->localtax2_tx,
|
||||
$line->fk_product,
|
||||
@ -2486,8 +2490,8 @@ class Facture extends CommonInvoice
|
||||
* @param double $pu_ht Unit price without tax (> 0 even for credit note)
|
||||
* @param double $qty Quantity
|
||||
* @param double $txtva Force Vat rate, -1 for auto (Can contain the vat_src_code too with syntax '9.9 (CODE)')
|
||||
* @param double $txlocaltax1 Local tax 1 rate (deprecated)
|
||||
* @param double $txlocaltax2 Local tax 2 rate (deprecated)
|
||||
* @param double $txlocaltax1 Local tax 1 rate (deprecated, use instead txtva with code inside)
|
||||
* @param double $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside)
|
||||
* @param int $fk_product Id of predefined product/service
|
||||
* @param double $remise_percent Percent of discount on line
|
||||
* @param int $date_start Date start of service
|
||||
|
||||
@ -545,6 +545,9 @@ if (empty($reshook))
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
||||
if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) $tva_npr=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -517,6 +517,9 @@ if (empty($reshook))
|
||||
$pu_ttc = price($prodcustprice->lines [0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines [0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines [0]->tva_tx;
|
||||
if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) $tva_npr=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3878,9 +3878,10 @@ abstract class CommonObject
|
||||
$this->tpl['description'] = ' ';
|
||||
}
|
||||
|
||||
// VAT Rate
|
||||
$this->tpl['vat_rate'] = vatrate($line->tva_tx, true);
|
||||
if (! empty($line->vat_src_code) && ! preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'].=' ('.$line->vat_src_code.')';
|
||||
// VAT Rate
|
||||
$this->tpl['vat_rate'] = vatrate($line->tva_tx, true);
|
||||
$this->tpl['vat_rate'] .= (($line->info_bits & 1) == 1) ? '*' : '';
|
||||
if (! empty($line->vat_src_code) && ! preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'].=' ('.$line->vat_src_code.')';
|
||||
|
||||
$this->tpl['price'] = price($line->subprice);
|
||||
$this->tpl['multicurrency_price'] = price($line->multicurrency_subprice);
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/import/import_csv.modules.php
|
||||
* \file htdocs/core/modules/import/import_xlsx.modules.php
|
||||
* \ingroup import
|
||||
* \brief File to load import files with CSV format
|
||||
* \brief File to load import files with Excel format
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/modules/import/modules_import.php';
|
||||
|
||||
@ -1291,7 +1291,7 @@ class Expedition extends CommonObject
|
||||
|
||||
$sql = "SELECT cd.rowid, cd.fk_product, cd.label as custom_label, cd.description, cd.qty as qty_asked, cd.product_type";
|
||||
$sql.= ", cd.total_ht, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.total_tva";
|
||||
$sql.= ", cd.vat_src_code, cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.price, cd.subprice, cd.remise_percent,cd.buy_price_ht as pa_ht";
|
||||
$sql.= ", cd.vat_src_code, cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.info_bits, cd.price, cd.subprice, cd.remise_percent,cd.buy_price_ht as pa_ht";
|
||||
$sql.= ", cd.fk_multicurrency, cd.multicurrency_code, cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc";
|
||||
$sql.= ", ed.rowid as line_id, ed.qty as qty_shipped, ed.fk_origin_line, ed.fk_entrepot";
|
||||
$sql.= ", p.ref as product_ref, p.label as product_label, p.fk_product_type";
|
||||
@ -1389,6 +1389,7 @@ class Expedition extends CommonObject
|
||||
$line->tva_tx = $obj->tva_tx;
|
||||
$line->localtax1_tx = $obj->localtax1_tx;
|
||||
$line->localtax2_tx = $obj->localtax2_tx;
|
||||
$line->info_bits = $obj->info_bits;
|
||||
$line->price = $obj->price;
|
||||
$line->subprice = $obj->subprice;
|
||||
$line->remise_percent = $obj->remise_percent;
|
||||
|
||||
@ -382,6 +382,8 @@ ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_tx d
|
||||
ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price double(24,8) DEFAULT NULL;
|
||||
ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE llx_product_customer_price_log ADD COLUMN default_vat_code varchar(10);
|
||||
|
||||
UPDATE llx_contrat SET ref = rowid WHERE ref IS NULL OR ref = '';
|
||||
ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT '';
|
||||
|
||||
|
||||
@ -920,7 +920,7 @@ if ($ok && GETPOST('force_utf8_on_tables','alpha'))
|
||||
{
|
||||
print '<tr><td colspan="2"><br>*** Force page code and collation of tables into utf8/utf8_unicode_ci (for mysql/mariadb only)</td></tr>';
|
||||
|
||||
if ($db->type == "mysql")
|
||||
if ($db->type == "mysql" || $db->type == "mysqli")
|
||||
{
|
||||
$listoftables = $db->DDLListTables($db->database_name);
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ BoxTitleLastModifiedSupplierBills=Latest %s modified supplier bills
|
||||
BoxTitleLatestModifiedSupplierOrders=Latest %s modified supplier orders
|
||||
BoxTitleLastModifiedCustomerBills=Latest %s modified customer bills
|
||||
BoxTitleLastModifiedCustomerOrders=Latest %s modified customer orders
|
||||
BoxTitleLastModifiedPropals=Latest %s modified propals
|
||||
BoxTitleLastModifiedPropals=Latest %s modified proposals
|
||||
ForCustomersInvoices=Customers invoices
|
||||
ForCustomersOrders=Customers orders
|
||||
ForProposals=Proposals
|
||||
|
||||
@ -374,6 +374,7 @@ TotalLT1IN=Total CGST
|
||||
TotalLT2IN=Total SGST
|
||||
HT=Net of tax
|
||||
TTC=Inc. tax
|
||||
INCVATONLY=Inc. VAT
|
||||
INCT=Inc. all taxes
|
||||
VAT=Sales tax
|
||||
VATIN=IGST
|
||||
|
||||
@ -135,7 +135,7 @@ DateMovement=Date of movement
|
||||
InventoryCode=Movement or inventory code
|
||||
IsInPackage=Contained into package
|
||||
WarehouseAllowNegativeTransfer=Stock can be negative
|
||||
qtyToTranferIsNotEnough=You don't have enough stock from your source warehouse
|
||||
qtyToTranferIsNotEnough=You don't have enough stock from your source warehouse and your setup does not allow negative stocks.
|
||||
ShowWarehouse=Show warehouse
|
||||
MovementCorrectStock=Stock correction for product %s
|
||||
MovementTransferStock=Stock transfer of product %s into another warehouse
|
||||
|
||||
@ -1801,8 +1801,15 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
print '<td align="center">' . $langs->trans("PriceBase") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("DefaultTaxRate") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("HT") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("TTC") . '</td>';
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") print '<td align="right">' . $langs->trans("INCT") . '</td>';
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
|
||||
{
|
||||
//print '<td align="right">' . $langs->trans("INCVATONLY") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("INCT") . '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">' . $langs->trans("TTC") . '</td>';
|
||||
}
|
||||
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("ChangedBy") . '</td>';
|
||||
@ -1844,20 +1851,28 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
print "<td>" . dol_print_date($line->datec, "dayhour") . "</td>";
|
||||
print '<td align="center">' . $langs->trans($line->price_base_type) . "</td>";
|
||||
print '<td align="right">';
|
||||
var_dump($prodcustprice);exit;
|
||||
|
||||
$positiverates='';
|
||||
if (price2num($objp->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($objp->tva_tx);
|
||||
if (price2num($objp->localtax1_type)) $positiverates.=($positiverates?'/':'').price2num($objp->localtax1_tx);
|
||||
if (price2num($objp->localtax2_type)) $positiverates.=($positiverates?'/':'').price2num($objp->localtax2_tx);
|
||||
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
|
||||
if (price2num($line->localtax1_type)) $positiverates.=($positiverates?'/':'').price2num($line->localtax1_tx);
|
||||
if (price2num($line->localtax2_type)) $positiverates.=($positiverates?'/':'').price2num($line->localtax2_tx);
|
||||
if (empty($positiverates)) $positiverates='0';
|
||||
echo vatrate($positiverates.($objp->default_vat_code?' ('.$objp->default_vat_code.')':''), '%', $objp->tva_npr);
|
||||
|
||||
echo vatrate($positiverates.($line->default_vat_code?' ('.$line->default_vat_code.')':''), '%', ($line->tva_npr?$line->tva_npr:$line->recuperableonly));
|
||||
|
||||
//. vatrate($tva_tx, true, $line->recuperableonly) .
|
||||
print "</td>";
|
||||
print '<td align="right">' . price($line->price) . "</td>";
|
||||
print '<td align="right">' . price($line->price_ttc) . "</td>";
|
||||
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") print '<td align="right">' . price($resultarray[2]) . '</td>';
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
|
||||
{
|
||||
//print '<td align="right">' . price($line->price_ttc) . "</td>";
|
||||
print '<td align="right">' . price($resultarray[2]) . '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">' . price($line->price_ttc) . "</td>";
|
||||
}
|
||||
|
||||
print '<td align="right">' . price($line->price_min) . '</td>';
|
||||
print '<td align="right">' . price($line->price_min_ttc) . '</td>';
|
||||
@ -1903,7 +1918,7 @@ var_dump($prodcustprice);exit;
|
||||
if (count($prodcustprice->lines) > 0 || $search_soc)
|
||||
{
|
||||
$colspan=8;
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") $colspan++;
|
||||
//if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") $colspan++;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_soc" value="' . $search_soc . '" size="20"></td>';
|
||||
@ -1922,8 +1937,16 @@ var_dump($prodcustprice);exit;
|
||||
print '<td align="center">' . $langs->trans("PriceBase") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("DefaultTaxRate") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("HT") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("TTC") . '</td>';
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") print '<td align="right">' . $langs->trans("INCT") . '</td>';
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
|
||||
{
|
||||
//print '<td align="right">' . $langs->trans("INCVATONLY") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("INCT") . '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">' . $langs->trans("TTC") . '</td>';
|
||||
}
|
||||
|
||||
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("ChangedBy") . '</td>';
|
||||
@ -1970,9 +1993,17 @@ var_dump($prodcustprice);exit;
|
||||
print "</td>";
|
||||
|
||||
print '<td align="right">' . price($object->price) . "</td>";
|
||||
print '<td align="right">' . price($object->price_ttc) . "</td>";
|
||||
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") print '<td align="right">' . price($resultarray[2]) . '</td>';
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
|
||||
{
|
||||
//print '<td align="right">' . price($object->price_ttc) . "</td>";
|
||||
print '<td align="right">' . price($resultarray[2]) . '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">' . price($object->price_ttc) . "</td>";
|
||||
}
|
||||
|
||||
|
||||
print '<td align="right">' . price($object->price_min) . '</td>';
|
||||
print '<td align="right">' . price($object->price_min_ttc) . '</td>';
|
||||
@ -1993,7 +2024,6 @@ var_dump($prodcustprice);exit;
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
if (count($prodcustprice->lines) > 0)
|
||||
{
|
||||
foreach ($prodcustprice->lines as $line)
|
||||
@ -2038,13 +2068,20 @@ var_dump($prodcustprice);exit;
|
||||
if (price2num($line->localtax1_type)) $positiverates.=($positiverates?'/':'').price2num($line->localtax1_tx);
|
||||
if (price2num($line->localtax2_type)) $positiverates.=($positiverates?'/':'').price2num($line->localtax2_tx);
|
||||
if (empty($positiverates)) $positiverates='0';
|
||||
echo vatrate($positiverates.($line->default_vat_code?' ('.$line->default_vat_code.')':''), '%', $line->tva_npr);
|
||||
echo vatrate($positiverates.($line->default_vat_code?' ('.$line->default_vat_code.')':''), '%', ($line->tva_npr?$line->tva_npr:$line->recuperableonly));
|
||||
|
||||
print "</td>";
|
||||
print '<td align="right">' . price($line->price) . "</td>";
|
||||
print '<td align="right">' . price($line->price_ttc) . "</td>";
|
||||
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") print '<td align="right">' . price($resultarray[2]) . '</td>';
|
||||
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
|
||||
{
|
||||
//print '<td align="right">' . price($line->price_ttc) . "</td>";
|
||||
print '<td align="right">' . price($resultarray[2]) . '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">' . price($line->price_ttc) . "</td>";
|
||||
}
|
||||
|
||||
print '<td align="right">' . price($line->price_min) . '</td>';
|
||||
print '<td align="right">' . price($line->price_min_ttc) . '</td>';
|
||||
|
||||
@ -3515,7 +3515,7 @@ table.cal_month td:last-child { border-right: 0px; }
|
||||
.cal_today_peruser { background: #FDFDF0; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||
.cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 2px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||
.cal_past { }
|
||||
.cal_peruser { padding: 0px; }
|
||||
.cal_peruser { padding-top: 0 !important; padding-bottom: 0 !important; padding-<?php print $left; ?>: 1px !important; padding-<?php print $right; ?>: 1px !important; }
|
||||
.cal_impair { background: #F8F8F8; }
|
||||
.cal_today_peruser_impair { background: #F8F8F0; }
|
||||
.peruser_busy { background: #CC8888; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user