mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX: Payed invoices are showed as canceled
FIX: Bad date filter on customer order
This commit is contained in:
parent
29a2185462
commit
c9c1247a28
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2012-2013 Philippe Berthet <berthet@systune.be>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* Version V1.1 Initial version of Philippe Berthet
|
||||
* Version V2 Change to be compatible with 3.4 and enhanced to be more generic
|
||||
|
|
@ -197,7 +198,7 @@ if ($type_element == 'invoice')
|
|||
{ // Customer : show products from invoices
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$documentstatic=new Facture($db);
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.facnumber as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, ';
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.facnumber as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, ';
|
||||
$tables_from = MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."facturedet as d";
|
||||
$where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||
$where.= " AND d.fk_facture = f.rowid";
|
||||
|
|
@ -228,7 +229,7 @@ if ($type_element == 'order')
|
|||
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||
$where.= " AND d.fk_commande = c.rowid";
|
||||
$where.= " AND c.entity = ".$conf->entity;
|
||||
$dateprint = 'c.datef';
|
||||
$dateprint = 'c.date_commande';
|
||||
$doc_number='c.ref';
|
||||
$thirdTypeSelect='customer';
|
||||
}
|
||||
|
|
@ -335,11 +336,12 @@ if ($sql_select)
|
|||
{
|
||||
$documentstatic->id=$objp->doc_id;
|
||||
$documentstatic->ref=$objp->doc_number;
|
||||
$documentstatic->type=$objp->type;
|
||||
$documentstatic->type=$objp->doc_type;
|
||||
$documentstatic->fk_statut=$objp->status;
|
||||
$documentstatic->fk_status=$objp->status;
|
||||
$documentstatic->statut=$objp->status;
|
||||
$documentstatic->status=$objp->status;
|
||||
$documentstatic->paye=$objp->paid;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user