Fix pb with renaming field total
This commit is contained in:
parent
0377508100
commit
7ff74768eb
@ -903,7 +903,7 @@ function getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
||||
if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
||||
$tmpinvoice = new Facture($db);
|
||||
|
||||
$sql = "SELECT f.rowid, f.ref, f.fk_statut as status, f.datef, f.type, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.paye, f.tms";
|
||||
$sql = "SELECT f.rowid, f.ref, f.fk_statut as status, f.datef, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms";
|
||||
$sql .= ", f.date_lim_reglement as datelimite";
|
||||
$sql .= ", s.nom as name";
|
||||
$sql .= ", s.rowid as socid, s.email";
|
||||
@ -929,7 +929,7 @@ function getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
||||
$reshook = $hookmanager->executeHooks('printFieldListWhereCustomerUnpaid', $parameters);
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= " GROUP BY f.rowid, f.ref, f.fk_statut, f.datef, f.type, f.total, f.tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
|
||||
$sql .= " GROUP BY f.rowid, f.ref, f.fk_statut, f.datef, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
|
||||
$sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_compta, cc.rowid, cc.code";
|
||||
$sql .= ", s.code_fournisseur, s.code_compta_fournisseur";
|
||||
$sql .= " ORDER BY f.datef ASC, f.ref ASC";
|
||||
@ -1117,7 +1117,7 @@ function getPurchaseInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
||||
$reshook = $hookmanager->executeHooks('printFieldListWhereSupplierUnpaid', $parameters);
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye, ff.date_lim_reglement,";
|
||||
$sql .= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye, ff.date_lim_reglement,";
|
||||
$sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur";
|
||||
$sql .= " ORDER BY ff.date_lim_reglement ASC";
|
||||
|
||||
|
||||
@ -301,18 +301,18 @@ class ExportTest extends PHPUnit\Framework\TestCase
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
/*
|
||||
$sql = "SELECT f.ref as f_ref, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f";
|
||||
$sql = "SELECT f.ref as f_ref, f.total_ht as f_total_ht, f.total_tva as f_total_tva FROM ".MAIN_DB_PREFIX."facture f";
|
||||
|
||||
$objexport=new Export($db);
|
||||
//$objexport->load_arrays($user,$datatoexport);
|
||||
|
||||
// Define properties
|
||||
$datatoexport='test_filtered';
|
||||
$array_selected = array("f.ref"=>1, "f.total"=>2, "f.tva"=>3);
|
||||
$array_export_fields = array("f.ref"=>"FacNumber", "f.total"=>"FacTotal", "f.tva"=>"FacVat");
|
||||
$array_filtervalue = array("f.total" => ">100");
|
||||
$array_filtered = array("f.total" => 1);
|
||||
$array_alias = array("f_ref"=>"ref", "f_total"=>"total", "f_tva"=>"tva");
|
||||
$array_selected = array("f.ref"=>1, "f.total_ht"=>2, "f.total_tva"=>3);
|
||||
$array_export_fields = array("f.ref"=>"FacNumber", "f.total_ht"=>"FacTotal", "f.total_tva"=>"FacVat");
|
||||
$array_filtervalue = array("f.total_ht" => ">100");
|
||||
$array_filtered = array("f.total_ht" => 1);
|
||||
$array_alias = array("f_ref"=>"ref", "f_total_ht"=>"total_ht", "f_total_tva"=>"total_tva");
|
||||
$objexport->array_export_fields[0]=$array_export_fields;
|
||||
$objexport->array_export_alias[0]=$array_alias;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user