Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
122538ca51
@ -19,8 +19,8 @@ WARNING:
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup.
|
||||
* API /setup/shipment_methods has been replaced with API /setup/shipping_methods
|
||||
* Field "tva" renamed into to "total_tva" in llx_propal, llx_supplier_proposal, llx_commande for better field name consistency
|
||||
* Field "total" renamed into "total_ttc" in llx_supplier_proposal for better field name consistency
|
||||
* Field "tva" renamed into "total_tva" in llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
|
||||
* Field "total" renamed into "total_ttc" in llx_propal, llx_supplier_proposal for better field name consistency
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.1 compared to 13.0.0 *****
|
||||
|
||||
@ -106,11 +106,18 @@ $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') :
|
||||
$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0));
|
||||
$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0));
|
||||
|
||||
$datefrom = 0;
|
||||
$dateto = 0;
|
||||
$paymentdate = -1;
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
// Create third party from a member
|
||||
if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) {
|
||||
if ($result > 0) {
|
||||
@ -826,9 +833,6 @@ if ($rowid > 0) {
|
||||
print '<tbody>';
|
||||
|
||||
$today = dol_now();
|
||||
$datefrom = 0;
|
||||
$dateto = 0;
|
||||
$paymentdate = -1;
|
||||
|
||||
// Date payment
|
||||
if (GETPOST('paymentyear') && GETPOST('paymentmonth') && GETPOST('paymentday')) {
|
||||
|
||||
@ -288,7 +288,7 @@ class Propal extends CommonObject
|
||||
'total_tva' =>array('type'=>'double(24,8)', 'label'=>'VAT', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1),
|
||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LocalTax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1),
|
||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LocalTax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1),
|
||||
'total' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1),
|
||||
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'BankAccount', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
|
||||
'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Currency', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
|
||||
@ -1039,7 +1039,7 @@ class Propal extends CommonObject
|
||||
$sql .= ", remise_percent";
|
||||
$sql .= ", remise_absolue";
|
||||
$sql .= ", total_tva";
|
||||
$sql .= ", total";
|
||||
$sql .= ", total_ttc";
|
||||
$sql .= ", datep";
|
||||
$sql .= ", datec";
|
||||
$sql .= ", ref";
|
||||
@ -1425,7 +1425,7 @@ class Propal extends CommonObject
|
||||
public function fetch($rowid, $ref = '', $ref_ext = '')
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc";
|
||||
$sql .= ", p.total, p.total_tva, p.localtax1, p.localtax2, p.total_ht";
|
||||
$sql .= ", p.total_ttc, p.total_tva, p.localtax1, p.localtax2, p.total_ht";
|
||||
$sql .= ", p.datec";
|
||||
$sql .= ", p.date_valid as datev";
|
||||
$sql .= ", p.datep as dp";
|
||||
@ -1622,7 +1622,7 @@ class Propal extends CommonObject
|
||||
$sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").",";
|
||||
$sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").",";
|
||||
$sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").",";
|
||||
$sql .= " total=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
|
||||
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
|
||||
$sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").",";
|
||||
$sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").",";
|
||||
$sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "null").",";
|
||||
|
||||
@ -198,7 +198,7 @@ if ($resql)
|
||||
* Draft proposals
|
||||
*/
|
||||
if (!empty($conf->propal->enabled)) {
|
||||
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total as total_ttc";
|
||||
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.client, s.canvas, s.code_client, s.email, s.entity, s.code_compta";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
|
||||
@ -391,7 +391,7 @@ $sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.tow
|
||||
$sql .= " typent.code as typent_code,";
|
||||
$sql .= " ava.rowid as availability,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.total_tva, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
|
||||
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.total_tva, p.total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
|
||||
$sql .= ' p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc,';
|
||||
$sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date_cloture,';
|
||||
$sql .= ' p.note_public, p.note_private,';
|
||||
@ -450,7 +450,7 @@ if ($search_societe_alias) $sql .= natural_search('s.name_alias', $search_soci
|
||||
if ($search_login) $sql .= natural_search("u.login", $search_login);
|
||||
if ($search_montant_ht != '') $sql .= natural_search("p.total_ht", $search_montant_ht, 1);
|
||||
if ($search_montant_vat != '') $sql .= natural_search("p.total_tva", $search_montant_vat, 1);
|
||||
if ($search_montant_ttc != '') $sql .= natural_search("p.total", $search_montant_ttc, 1);
|
||||
if ($search_montant_ttc != '') $sql .= natural_search("p.total_ttc", $search_montant_ttc, 1);
|
||||
if ($search_multicurrency_code != '') $sql .= ' AND p.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"';
|
||||
if ($search_multicurrency_tx != '') $sql .= natural_search('p.multicurrency_tx', $search_multicurrency_tx, 1);
|
||||
if ($search_multicurrency_montant_ht != '') $sql .= natural_search('p.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
* Copyright (C) 2014-2020 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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,8 +768,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Close all lines
|
||||
elseif ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer)
|
||||
{
|
||||
elseif ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) {
|
||||
$result = $object->closeAll($user);
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -778,15 +777,13 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Close all lines
|
||||
elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->rights->contrat->creer)
|
||||
{
|
||||
elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->rights->contrat->creer) {
|
||||
$result = $object->activateAll($user);
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer)
|
||||
{
|
||||
} elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) {
|
||||
$result = $object->delete($user);
|
||||
if ($result >= 0)
|
||||
{
|
||||
@ -795,13 +792,12 @@ if (empty($reshook))
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer)
|
||||
{
|
||||
} elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) {
|
||||
if (GETPOST('newcid') > 0)
|
||||
{
|
||||
$contractline = new ContratLigne($db);
|
||||
$result = $contractline->fetch(GETPOST('lineid'));
|
||||
$contractline->fk_contrat = GETPOST('newcid');
|
||||
$result = $contractline->fetch(GETPOSTINT('lineid'));
|
||||
$contractline->fk_contrat = GETPOSTINT('newcid');
|
||||
$result = $contractline->update($user, 1);
|
||||
if ($result >= 0)
|
||||
{
|
||||
@ -871,8 +867,7 @@ if (empty($reshook))
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
} elseif ($action == 'setref')
|
||||
{
|
||||
} elseif ($action == 'setref') {
|
||||
$cancelbutton = GETPOST('cancel', 'alpha');
|
||||
|
||||
if (!$cancelbutton) {
|
||||
@ -909,8 +904,7 @@ if (empty($reshook))
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
} elseif ($action == 'setdate_contrat')
|
||||
{
|
||||
} elseif ($action == 'setdate_contrat') {
|
||||
$cancelbutton = GETPOST('cancel', 'alpha');
|
||||
|
||||
if (!$cancelbutton) {
|
||||
|
||||
@ -88,7 +88,7 @@ class box_supplier_orders extends ModeleBoxes
|
||||
$sql .= ", s.logo, s.email, s.entity";
|
||||
$sql .= ", c.rowid, c.ref, c.tms, c.date_commande";
|
||||
$sql .= ", c.total_ht";
|
||||
$sql .= ", c.tva as total_tva";
|
||||
$sql .= ", c.total_tva";
|
||||
$sql .= ", c.total_ttc";
|
||||
$sql .= ", c.fk_statut";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
|
||||
@ -88,7 +88,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
|
||||
$sql .= ", s.logo, s.email, s.entity";
|
||||
$sql .= ", c.rowid, c.ref, c.tms, c.date_commande, c.date_livraison as delivery_date";
|
||||
$sql .= ", c.total_ht";
|
||||
$sql .= ", c.tva as total_tva";
|
||||
$sql .= ", c.total_tva";
|
||||
$sql .= ", c.total_ttc";
|
||||
$sql .= ", c.fk_statut";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
|
||||
@ -3230,13 +3230,11 @@ abstract class CommonObject
|
||||
// Specific code for backward compatibility with old field names
|
||||
if ($this->element == 'facture' || $this->element == 'facturerec') $fieldht = 'total';
|
||||
if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'propal') {
|
||||
$fieldttc = 'total';
|
||||
$fieldtva = 'total_tva';
|
||||
}
|
||||
if ($this->element == 'propal') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'expensereport') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'supplier_proposal') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'commande') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'order_supplier') $fieldtva = 'total_tva';
|
||||
|
||||
if (empty($nodatabaseupdate))
|
||||
{
|
||||
|
||||
@ -522,7 +522,7 @@ class modFournisseur extends DolibarrModules
|
||||
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
|
||||
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.idprof5'=>'ProfId5', 's.idprof6'=>'ProfId6', 's.tva_intra'=>'VATIntra',
|
||||
'f.rowid'=>"OrderId", 'f.ref'=>"Ref", 'f.ref_supplier'=>"RefSupplier", 'f.date_creation'=>"DateCreation", 'f.date_commande'=>"OrderDate", 'f.date_livraison'=>"DateDeliveryPlanned",
|
||||
'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.fk_statut'=>'Status', 'f.date_approve'=>'DateApprove', 'f.date_approve2'=>'DateApprove2',
|
||||
'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.fk_statut'=>'Status', 'f.date_approve'=>'DateApprove', 'f.date_approve2'=>'DateApprove2',
|
||||
'f.note_public'=>"NotePublic", 'f.note_private'=>"NotePrivate", 'ua1.login'=>'ApprovedBy', 'ua2.login'=>'ApprovedBy2', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription",
|
||||
'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.remise_percent'=>"Discount", 'fd.total_ht'=>"LineTotalHT", 'fd.total_ttc'=>"LineTotalTTC",
|
||||
'fd.total_tva'=>"LineTotalVAT", 'fd.product_type'=>'TypeOfLineServiceOrProduct', 'fd.ref'=>'RefSupplier', 'fd.fk_product'=>'ProductId',
|
||||
@ -544,7 +544,7 @@ class modFournisseur extends DolibarrModules
|
||||
$this->export_TypeFields_array[$r] = array(
|
||||
's.rowid'=>"company", 's.nom'=>'Text', 's.address'=>'Text', 's.cp'=>'Text', 's.ville'=>'Text', 'c.code'=>'Text', 's.tel'=>'Text', 's.siren'=>'Text',
|
||||
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.idprof5'=>'Text', 's.idprof6'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text",
|
||||
'f.date_creation'=>"Date", 'f.date_commande'=>"Date", 'f.date_livraison'=>"Date", 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric",
|
||||
'f.date_creation'=>"Date", 'f.date_commande'=>"Date", 'f.date_livraison'=>"Date", 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric",
|
||||
'f.fk_statut'=>'Status', 'f.date_approve'=>'Date', 'f.date_approve2'=>'Date', 'f.note_public'=>"Text", 'f.note_private'=>"Text", 'fd.description'=>"Text",
|
||||
'fd.tva_tx'=>"Numeric", 'fd.qty'=>"Numeric", 'fd.remise_percent'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.total_tva'=>"Numeric",
|
||||
'fd.product_type'=>'Numeric', 'fd.ref'=>'Text', 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', 'project.ref'=>'Text', 'project.title'=>'Text'
|
||||
@ -852,7 +852,7 @@ class modFournisseur extends DolibarrModules
|
||||
'c.fk_statut' => 'Status*',
|
||||
'c.billed' => 'Billed(0/1)',
|
||||
'c.remise_percent' => 'GlobalDiscount',
|
||||
'c.tva' => 'TotalTVA',
|
||||
'c.total_tva' => 'TotalTVA',
|
||||
'c.total_ht' => 'TotalHT',
|
||||
'c.total_ttc' => 'TotalTTC',
|
||||
'c.note_private' => 'NotePrivate',
|
||||
|
||||
@ -191,7 +191,7 @@ class modPropale extends DolibarrModules
|
||||
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'co.code'=>'CountryCode', 's.phone'=>'Phone',
|
||||
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 'c.rowid'=>"Id", 'c.ref'=>"Ref", 'c.ref_client'=>"RefCustomer",
|
||||
'c.fk_soc'=>"IdCompany", 'c.datec'=>"DateCreation", 'c.datep'=>"DatePropal", 'c.fin_validite'=>"DateEndPropal", 'c.remise_percent'=>"GlobalDiscount",
|
||||
'c.total_ht'=>"TotalHT", 'c.total'=>"TotalTTC", 'c.fk_statut'=>'Status', 'c.note_public'=>"Note", 'c.date_livraison'=>'DeliveryDate',
|
||||
'c.total_ht'=>"TotalHT", 'c.total_ttc'=>"TotalTTC", 'c.fk_statut'=>'Status', 'c.note_public'=>"Note", 'c.date_livraison'=>'DeliveryDate',
|
||||
'c.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin', 'c.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin',
|
||||
'pj.ref'=>'ProjectRef', 'cd.rowid'=>'LineId', 'cd.label'=>"Label", 'cd.description'=>"LineDescription", 'cd.product_type'=>'TypeOfLineServiceOrProduct',
|
||||
'cd.tva_tx'=>"LineVATRate", 'cd.qty'=>"LineQty", 'cd.total_ht'=>"LineTotalHT", 'cd.total_tva'=>"LineTotalVAT", 'cd.total_ttc'=>"LineTotalTTC",
|
||||
@ -208,14 +208,14 @@ class modPropale extends DolibarrModules
|
||||
//$this->export_TypeFields_array[$r]=array(
|
||||
// 's.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.code'=>'Text','s.phone'=>'Text',
|
||||
// 's.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",
|
||||
// 'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text",
|
||||
// 'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total_ttc'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text",
|
||||
// 'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",
|
||||
// 'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text'
|
||||
//);
|
||||
$this->export_TypeFields_array[$r] = array(
|
||||
's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'co.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text',
|
||||
's.ape'=>'Text', 's.idprof4'=>'Text', 'c.ref'=>"Text", 'c.ref_client'=>"Text", 'c.datec'=>"Date", 'c.datep'=>"Date", 'c.fin_validite'=>"Date",
|
||||
'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric", 'c.total'=>"Numeric", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date',
|
||||
'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric", 'c.total_ttc'=>"Numeric", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date',
|
||||
'pj.ref'=>'Text', 'cd.description'=>"Text", 'cd.product_type'=>'Boolean', 'cd.tva_tx'=>"Numeric", 'cd.qty'=>"Numeric", 'cd.total_ht'=>"Numeric",
|
||||
'cd.total_tva'=>"Numeric", 'cd.total_ttc'=>"Numeric", 'p.ref'=>'Text', 'p.label'=>'Text'
|
||||
);
|
||||
@ -223,7 +223,7 @@ class modPropale extends DolibarrModules
|
||||
's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'co.code'=>'company', 's.phone'=>'company',
|
||||
's.siren'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.siret'=>'company', 'c.rowid'=>"propal", 'c.ref'=>"propal", 'c.ref_client'=>"propal",
|
||||
'c.fk_soc'=>"propal", 'c.datec'=>"propal", 'c.datep'=>"propal", 'c.fin_validite'=>"propal", 'c.remise_percent'=>"propal", 'c.total_ht'=>"propal",
|
||||
'c.total'=>"propal", 'c.fk_statut'=>"propal", 'c.note_public'=>"propal", 'c.date_livraison'=>"propal", 'pj.ref'=>'project', 'cd.rowid'=>'propal_line',
|
||||
'c.total_ttc'=>"propal", 'c.fk_statut'=>"propal", 'c.note_public'=>"propal", 'c.date_livraison'=>"propal", 'pj.ref'=>'project', 'cd.rowid'=>'propal_line',
|
||||
'cd.label'=>"propal_line", 'cd.description'=>"propal_line", 'cd.product_type'=>'propal_line', 'cd.tva_tx'=>"propal_line", 'cd.qty'=>"propal_line",
|
||||
'cd.total_ht'=>"propal_line", 'cd.total_tva'=>"propal_line", 'cd.total_ttc'=>"propal_line", 'p.rowid'=>'product', 'p.ref'=>'product', 'p.label'=>'product'
|
||||
);
|
||||
@ -276,7 +276,7 @@ class modPropale extends DolibarrModules
|
||||
'c.fin_validite' => 'DateEndPropal',
|
||||
'c.remise_percent' => 'GlobalDiscount',
|
||||
'c.total_ht' => 'TotalHT',
|
||||
'c.total' => 'TotalTTC',
|
||||
'c.total_ttc' => 'TotalTTC',
|
||||
'c.fk_statut' => 'Status*',
|
||||
'c.note_public' => 'Note',
|
||||
'c.date_livraison' => 'DeliveryDate',
|
||||
@ -313,7 +313,7 @@ class modPropale extends DolibarrModules
|
||||
'c.fin_validite' => '2020-01-01',
|
||||
'c.remise_percent' => '',
|
||||
'c.total_ht' => '0',
|
||||
'c.total' => '0',
|
||||
'c.total_ttc' => '0',
|
||||
'c.fk_statut' => '1',
|
||||
'c.note_public' => '',
|
||||
'c.date_livraison' => '2020-01-01',
|
||||
|
||||
@ -275,6 +275,9 @@ if ($action == 'presend')
|
||||
foreach ($contactarr as $contact) {
|
||||
$contactstatic->fetch($contact['id']);
|
||||
$substitutionarray['__CONTACT_NAME_'.$contact['code'].'__'] = $contactstatic->getFullName($outputlangs, 1);
|
||||
$substitutionarray['__CONTACT_LASTNAME_'.$contact['code'].'__'] = $contactstatic->lastname;
|
||||
$substitutionarray['__CONTACT_FIRSTNAME_'.$contact['code'].'__'] = $contactstatic->firstname;
|
||||
$substitutionarray['__CONTACT_TITLE_'.$contact['code'].'__'] = $contactstatic->getCivilityLabel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -204,7 +204,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
'amount_ht' =>array('type'=>'double(24,8)', 'label'=>'Amount ht', 'enabled'=>1, 'visible'=>-1, 'position'=>115),
|
||||
'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
|
||||
'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
|
||||
'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1),
|
||||
'total_tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1),
|
||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1),
|
||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1),
|
||||
'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1),
|
||||
@ -305,7 +305,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
// Check parameters
|
||||
if (empty($id) && empty($ref)) return -1;
|
||||
|
||||
$sql = "SELECT c.rowid, c.entity, c.ref, ref_supplier, c.fk_soc, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_vat,";
|
||||
$sql = "SELECT c.rowid, c.entity, c.ref, ref_supplier, c.fk_soc, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.total_tva,";
|
||||
$sql .= " c.localtax1, c.localtax2, ";
|
||||
$sql .= " c.date_creation, c.date_valid, c.date_approve, c.date_approve2,";
|
||||
$sql .= " c.fk_user_author, c.fk_user_valid, c.fk_user_approve, c.fk_user_approve2,";
|
||||
@ -356,7 +356,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->user_approve_id = $obj->fk_user_approve;
|
||||
$this->user_approve_id2 = $obj->fk_user_approve2;
|
||||
$this->total_ht = $obj->total_ht;
|
||||
$this->total_tva = $obj->total_vat;
|
||||
$this->total_tva = $obj->total_tva;
|
||||
$this->total_localtax1 = $obj->localtax1;
|
||||
$this->total_localtax2 = $obj->localtax2;
|
||||
$this->total_ttc = $obj->total_ttc;
|
||||
@ -451,7 +451,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$sql .= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc';
|
||||
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
|
||||
$sql .= ", pfp.rowid as fk_pfp, pfp.packaging";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid';
|
||||
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON l.fk_product = pfp.fk_product and l.ref = pfp.ref_fourn";
|
||||
|
||||
@ -78,12 +78,12 @@ $optioncss = GETPOST('optioncss', 'alpha');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$search_sale = GETPOST('search_sale', 'int');
|
||||
$search_total_ht = GETPOST('search_total_ht', 'alpha');
|
||||
$search_total_vat = GETPOST('search_total_vat', 'alpha');
|
||||
$search_total_tva = GETPOST('search_total_tva', 'alpha');
|
||||
$search_total_ttc = GETPOST('search_total_ttc', 'alpha');
|
||||
$search_multicurrency_code = GETPOST('search_multicurrency_code', 'alpha');
|
||||
$search_multicurrency_tx = GETPOST('search_multicurrency_tx', 'alpha');
|
||||
$search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha');
|
||||
$search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha');
|
||||
$search_multicurrency_montant_tva = GETPOST('search_multicurrency_montant_tva', 'alpha');
|
||||
$search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$search_billed = GETPOST('search_billed', 'int');
|
||||
@ -155,12 +155,12 @@ $arrayfields = array(
|
||||
'cf.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1),
|
||||
'cf.date_livraison'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)),
|
||||
'cf.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
|
||||
'cf.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0),
|
||||
'cf.total_tva'=>array('label'=>"AmountVAT", 'checked'=>0),
|
||||
'cf.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0),
|
||||
'cf.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_total_tva'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'cf.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
||||
@ -210,12 +210,12 @@ if (empty($reshook))
|
||||
$search_type_thirdparty = '';
|
||||
$search_request_author = '';
|
||||
$search_total_ht = '';
|
||||
$search_total_vat = '';
|
||||
$search_total_tva = '';
|
||||
$search_total_ttc = '';
|
||||
$search_multicurrency_code = '';
|
||||
$search_multicurrency_tx = '';
|
||||
$search_multicurrency_montant_ht = '';
|
||||
$search_multicurrency_montant_vat = '';
|
||||
$search_multicurrency_montant_tva = '';
|
||||
$search_multicurrency_montant_ttc = '';
|
||||
$search_project_ref = '';
|
||||
$search_status = -1;
|
||||
@ -477,7 +477,7 @@ if (empty($reshook))
|
||||
if ($search_user > 0) $param .= '&search_user='.urlencode($search_user);
|
||||
if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale);
|
||||
if ($search_total_ht != '') $param .= '&search_total_ht='.urlencode($search_total_ht);
|
||||
if ($search_total_vat != '') $param .= '&search_total_vat='.urlencode($search_total_vat);
|
||||
if ($search_total_tva != '') $param .= '&search_total_tva='.urlencode($search_total_tva);
|
||||
if ($search_total_ttc != '') $param .= '&search_total_ttc='.urlencode($search_total_ttc);
|
||||
if ($search_project_ref >= 0) $param .= "&search_project_ref=".urlencode($search_project_ref);
|
||||
if ($show_files) $param .= '&show_files='.urlencode($show_files);
|
||||
@ -539,8 +539,8 @@ if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DI
|
||||
$sql .= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,';
|
||||
$sql .= " typent.code as typent_code,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_livraison,";
|
||||
$sql .= ' cf.fk_multicurrency, cf.multicurrency_code, cf.multicurrency_tx, cf.multicurrency_total_ht, cf.multicurrency_total_tva as multicurrency_total_vat, cf.multicurrency_total_ttc,';
|
||||
$sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_livraison,";
|
||||
$sql .= ' cf.fk_multicurrency, cf.multicurrency_code, cf.multicurrency_tx, cf.multicurrency_total_ht, cf.multicurrency_total_tva, cf.multicurrency_total_ttc,';
|
||||
$sql .= ' cf.date_creation as date_creation, cf.tms as date_update,';
|
||||
$sql .= ' cf.note_public, cf.note_private,';
|
||||
$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_title,";
|
||||
@ -600,12 +600,12 @@ if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
||||
if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$db->escape($search_sale);
|
||||
if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='supplier_order' AND tc.source='internal' AND ec.element_id = cf.rowid AND ec.fk_socpeople = ".$db->escape($search_user);
|
||||
if ($search_total_ht != '') $sql .= natural_search('cf.total_ht', $search_total_ht, 1);
|
||||
if ($search_total_vat != '') $sql .= natural_search('cf.tva', $search_total_vat, 1);
|
||||
if ($search_total_tva != '') $sql .= natural_search('cf.total_tva', $search_total_tva, 1);
|
||||
if ($search_total_ttc != '') $sql .= natural_search('cf.total_ttc', $search_total_ttc, 1);
|
||||
if ($search_multicurrency_code != '') $sql .= ' AND cf.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"';
|
||||
if ($search_multicurrency_tx != '') $sql .= natural_search('cf.multicurrency_tx', $search_multicurrency_tx, 1);
|
||||
if ($search_multicurrency_montant_ht != '') $sql .= natural_search('cf.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
|
||||
if ($search_multicurrency_montant_vat != '') $sql .= natural_search('cf.multicurrency_total_tva', $search_multicurrency_montant_vat, 1);
|
||||
if ($search_multicurrency_montant_tva != '') $sql .= natural_search('cf.multicurrency_total_tva', $search_multicurrency_montant_tva, 1);
|
||||
if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('cf.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1);
|
||||
if ($search_project_ref != '') $sql .= natural_search("p.ref", $search_project_ref);
|
||||
// Add where from extra fields
|
||||
@ -672,7 +672,7 @@ if ($resql)
|
||||
if ($search_multicurrency_code != '') $param .= '&search_multicurrency_code='.urlencode($search_multicurrency_code);
|
||||
if ($search_multicurrency_tx != '') $param .= '&search_multicurrency_tx='.urlencode($search_multicurrency_tx);
|
||||
if ($search_multicurrency_montant_ht != '') $param .= '&search_multicurrency_montant_ht='.urlencode($search_multicurrency_montant_ht);
|
||||
if ($search_multicurrency_montant_vat != '') $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat);
|
||||
if ($search_multicurrency_montant_tva != '') $param .= '&search_multicurrency_montant_tva='.urlencode($search_multicurrency_montant_tva);
|
||||
if ($search_multicurrency_montant_ttc != '') $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc);
|
||||
if ($search_refsupp) $param .= "&search_refsupp=".urlencode($search_refsupp);
|
||||
if ($search_status != '' && $search_status != '-1') $param .= "&search_status=".urlencode($search_status);
|
||||
@ -905,11 +905,11 @@ if ($resql)
|
||||
print '<input class="flat" type="text" size="5" name="search_total_ht" value="'.$search_total_ht.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['cf.total_vat']['checked']))
|
||||
if (!empty($arrayfields['cf.total_tva']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_total_vat" value="'.$search_total_vat.'">';
|
||||
print '<input class="flat" type="text" size="5" name="search_total_tva" value="'.$search_total_tva.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['cf.total_ttc']['checked']))
|
||||
@ -940,11 +940,11 @@ if ($resql)
|
||||
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ht" value="'.dol_escape_htmltag($search_multicurrency_montant_ht).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['cf.multicurrency_total_vat']['checked']))
|
||||
if (!empty($arrayfields['cf.multicurrency_total_tva']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_vat" value="'.dol_escape_htmltag($search_multicurrency_montant_vat).'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_tva" value="'.dol_escape_htmltag($search_multicurrency_montant_tva).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked']))
|
||||
@ -1011,12 +1011,12 @@ if ($resql)
|
||||
if (!empty($arrayfields['cf.date_commande']['checked'])) print_liste_field_titre($arrayfields['cf.date_commande']['label'], $_SERVER["PHP_SELF"], "cf.date_commande", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['cf.date_livraison']['checked'])) print_liste_field_titre($arrayfields['cf.date_livraison']['label'], $_SERVER["PHP_SELF"], 'cf.date_livraison', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['cf.total_ht']['checked'])) print_liste_field_titre($arrayfields['cf.total_ht']['label'], $_SERVER["PHP_SELF"], "cf.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['cf.total_vat']['checked'])) print_liste_field_titre($arrayfields['cf.total_vat']['label'], $_SERVER["PHP_SELF"], "cf.tva", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['cf.total_tva']['checked'])) print_liste_field_titre($arrayfields['cf.total_tva']['label'], $_SERVER["PHP_SELF"], "cf.total_tva", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['cf.total_ttc']['checked'])) print_liste_field_titre($arrayfields['cf.total_ttc']['label'], $_SERVER["PHP_SELF"], "cf.total_ttc", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['cf.multicurrency_code']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_code', '', $param, '', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['cf.multicurrency_tx']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_tx', '', $param, '', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['cf.multicurrency_total_ht']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['cf.multicurrency_total_vat']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['cf.multicurrency_total_tva']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_total_tva']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
@ -1199,12 +1199,12 @@ if ($resql)
|
||||
$totalarray['val']['cf.total_ht'] += $obj->total_ht;
|
||||
}
|
||||
// Amount VAT
|
||||
if (!empty($arrayfields['cf.total_vat']['checked']))
|
||||
if (!empty($arrayfields['cf.total_tva']['checked']))
|
||||
{
|
||||
print '<td class="right">'.price($obj->total_tva)."</td>\n";
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_vat';
|
||||
$totalarray['val']['cf.total_vat'] += $obj->total_tva;
|
||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_tva';
|
||||
$totalarray['val']['cf.total_tva'] += $obj->total_tva;
|
||||
}
|
||||
// Amount TTC
|
||||
if (!empty($arrayfields['cf.total_ttc']['checked']))
|
||||
@ -1237,9 +1237,9 @@ if ($resql)
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Amount VAT
|
||||
if (!empty($arrayfields['cf.multicurrency_total_vat']['checked']))
|
||||
if (!empty($arrayfields['cf.multicurrency_total_tva']['checked']))
|
||||
{
|
||||
print '<td class="right nowrap">'.price($obj->multicurrency_total_vat)."</td>\n";
|
||||
print '<td class="right nowrap">'.price($obj->multicurrency_total_tva)."</td>\n";
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Amount TTC
|
||||
|
||||
@ -180,4 +180,6 @@ ALTER TABLE llx_commande CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
ALTER TABLE llx_supplier_proposal CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
ALTER TABLE llx_supplier_proposal CHANGE COLUMN total total_ttc double(24,8) default 0;
|
||||
ALTER TABLE llx_propal CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
ALTER TABLE llx_propal CHANGE COLUMN total total_ttc double(24,8) default 0;
|
||||
ALTER TABLE llx_commande_fournisseur CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ create table llx_commande_fournisseur
|
||||
amount_ht double(24,8) default 0,
|
||||
remise_percent real default 0,
|
||||
remise real default 0,
|
||||
tva double(24,8) default 0,
|
||||
total_tva double(24,8) default 0,
|
||||
localtax1 double(24,8) default 0,
|
||||
localtax2 double(24,8) default 0,
|
||||
total_ht double(24,8) default 0,
|
||||
|
||||
@ -51,7 +51,7 @@ create table llx_propal
|
||||
total_tva double(24,8) DEFAULT 0, -- montant total tva apres remise globale
|
||||
localtax1 double(24,8) DEFAULT 0, -- amount total localtax1
|
||||
localtax2 double(24,8) DEFAULT 0, -- amount total localtax2
|
||||
total double(24,8) DEFAULT 0, -- montant total ttc apres remise globale
|
||||
total_ttc double(24,8) DEFAULT 0, -- montant total ttc apres remise globale
|
||||
|
||||
fk_account integer, -- bank account
|
||||
fk_currency varchar(3), -- currency code
|
||||
|
||||
Loading…
Reference in New Issue
Block a user