Browse Source

Clean code

Laurent Destailleur 4 years ago
parent
commit
ec6c735d89

+ 1 - 1
htdocs/contrat/class/contrat.class.php

@@ -928,7 +928,7 @@ class Contrat extends CommonObject
 
 		$this->nbofservices = count($this->lines);
         $this->total_ttc = price2num($total_ttc); // TODO For the moment value is false as value is not stored in database for line linked to products
-        $this->total_vat = price2num($total_vat); // TODO For the moment value is false as value is not stored in database for line linked to products
+        $this->total_tva = price2num($total_vat); // TODO For the moment value is false as value is not stored in database for line linked to products
         $this->total_ht = price2num($total_ht); // TODO For the moment value is false as value is not stored in database for line linked to products
 
 		return $this->lines;

+ 1 - 1
htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php

@@ -320,7 +320,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
 				'__FROM_EMAIL__' => $this->emetteur->email,
 				'__TOTAL_TTC__' => $object->total_ttc,
 				'__TOTAL_HT__' => $object->total_ht,
-				'__TOTAL_VAT__' => $object->total_vat
+				'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 1 - 1
htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php

@@ -320,7 +320,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
 					'__FROM_EMAIL__' => $this->emetteur->email,
 					'__TOTAL_TTC__' => $object->total_ttc,
 					'__TOTAL_HT__' => $object->total_ht,
-					'__TOTAL_VAT__' => $object->total_vat
+					'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 1 - 1
htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php

@@ -348,7 +348,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
 				'__FROM_EMAIL__' => $this->emetteur->email,
 				'__TOTAL_TTC__' => $object->total_ttc,
 				'__TOTAL_HT__' => $object->total_ht,
-				'__TOTAL_VAT__' => $object->total_vat
+				'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 1 - 1
htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php

@@ -323,7 +323,7 @@ class doc_generic_stock_odt extends ModelePDFStock
 				'__FROM_EMAIL__' => $this->emetteur->email,
 				'__TOTAL_TTC__' => $object->total_ttc,
 				'__TOTAL_HT__' => $object->total_ht,
-				'__TOTAL_VAT__' => $object->total_vat
+				'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 1 - 1
htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php

@@ -312,7 +312,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
 				'__FROM_EMAIL__' => $this->issuer->email,
 				'__TOTAL_TTC__' => $object->total_ttc,
 				'__TOTAL_HT__' => $object->total_ht,
-				'__TOTAL_VAT__' => $object->total_vat
+				'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 1 - 1
htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php

@@ -349,7 +349,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
 				'__FROM_EMAIL__' => $this->emetteur->email,
 				'__TOTAL_TTC__' => $object->total_ttc,
 				'__TOTAL_HT__' => $object->total_ht,
-				'__TOTAL_VAT__' => $object->total_vat
+				'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 1 - 1
htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php

@@ -330,7 +330,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
 				'__FROM_EMAIL__' => $this->emetteur->email,
 				'__TOTAL_TTC__' => $object->total_ttc,
 				'__TOTAL_HT__' => $object->total_ht,
-				'__TOTAL_VAT__' => $object->total_vat
+				'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 1 - 1
htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php

@@ -316,7 +316,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
 					'__FROM_EMAIL__' => $this->emetteur->email,
 					'__TOTAL_TTC__' => $object->total_ttc,
 					'__TOTAL_HT__' => $object->total_ht,
-					'__TOTAL_VAT__' => $object->total_vat
+					'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 7 - 0
htdocs/product/class/product.class.php

@@ -388,6 +388,13 @@ class Product extends CommonObject
 	 */
 	public $price_autogen = 0;
 
+	/**
+	 * Array with list of supplier prices of product
+	 *
+	 * @var array
+	 */
+	public $supplierprices;
+
 
 	public $fields = array(
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),

+ 1 - 1
htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php

@@ -316,7 +316,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
 					'__FROM_EMAIL__' => $this->emetteur->email,
 					'__TOTAL_TTC__' => $object->total_ttc,
 					'__TOTAL_HT__' => $object->total_ht,
-					'__TOTAL_VAT__' => $object->total_vat
+					'__TOTAL_VAT__' => $object->total_tva
 				);
 				complete_substitutions_array($substitutionarray, $langs, $object);
 				// Call the ODTSubstitution hook

+ 0 - 15
htdocs/webservices/server_productorservice.php

@@ -714,21 +714,6 @@ function updateProductOrService($authentication, $product)
         $newobject->customcode = $product['customcode'];
 
         $newobject->canvas = $product['canvas'];
-        /*foreach($product['lines'] as $line)
-        {
-            $newline=new FactureLigne($db);
-            $newline->type=$line['type'];
-            $newline->desc=$line['desc'];
-            $newline->fk_product=$line['fk_product'];
-            $newline->total_ht=$line['total_net'];
-            $newline->total_vat=$line['total_vat'];
-            $newline->total_ttc=$line['total'];
-            $newline->vat=$line['vat_rate'];
-            $newline->qty=$line['qty'];
-            $newline->fk_product=$line['product_id'];
-        }*/
-        //var_dump($product['ref_ext']);
-        //var_dump($product['lines'][0]['type']);
 
         $elementtype = 'product';