Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5a7adf9b47
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
@ -69,7 +69,7 @@ $search_refcustomer=GETPOST('search_refcustomer','alpha');
|
||||
$search_societe=GETPOST('search_societe','alpha');
|
||||
$search_montant_ht=GETPOST('search_montant_ht','alpha');
|
||||
$search_montant_ttc=GETPOST('search_montant_ttc','alpha');
|
||||
$search_status=GETPOST('search_status','alpha');
|
||||
$search_status=GETPOST('search_status','int');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
@ -191,7 +191,7 @@ if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcusto
|
||||
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
||||
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
|
||||
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
||||
if ($search_status >= 0 ) $sql.= " AND f.fk_statut = ".$db->escape($search_status);
|
||||
if ($search_status != '') $sql.= " AND f.fk_statut = ".$db->escape($search_status);
|
||||
if ($month > 0)
|
||||
{
|
||||
if ($year > 0 && empty($day))
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
@ -781,6 +781,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsCustomersUnpaid",$num).' <a href="'.DOL_URL_ROOT.'/compta/facture/list.php?search_status=1"><span class="badge">'.$num.'</span></a></td>';
|
||||
print '<td align="right">'.$langs->trans("DateDue").'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Received").'</td>';
|
||||
@ -830,6 +831,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
$societestatic->code_fournisseur = $obj->code_fournisseur;
|
||||
print $societestatic->getNomUrl(1,'customer',44);
|
||||
print '</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->datelimite),'day').'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
print '<td align="right">'.price($obj->am).'</td>';
|
||||
@ -844,6 +846,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToTake").': '.price($total_ttc-$totalam).')</font> </td>';
|
||||
print '<td> </td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($total).'</td>';
|
||||
print '<td align="right">'.price($total_ttc).'</td>';
|
||||
print '<td align="right">'.price($totalam).'</td>';
|
||||
@ -852,7 +855,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
}
|
||||
else
|
||||
{
|
||||
$colspan=5;
|
||||
$colspan=6;
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
|
||||
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||
}
|
||||
@ -873,6 +876,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$facstatic=new FactureFournisseur($db);
|
||||
|
||||
$sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye";
|
||||
$sql.= ", ff.date_lim_reglement";
|
||||
$sql.= ", s.nom as name";
|
||||
$sql.= ", s.rowid as socid";
|
||||
$sql.= ", s.code_client";
|
||||
@ -889,6 +893,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
if ($socid) $sql.= " AND ff.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye,";
|
||||
$sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur";
|
||||
$sql.= " ORDER BY ff.date_lim_reglement ASC";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
@ -898,6 +903,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsSuppliersUnpaid",$num).' <a href="'.DOL_URL_ROOT.'/fourn/facture/impayees.php"><span class="badge">'.$num.'</span></a></td>';
|
||||
print '<td align="right">'.$langs->trans("DateDue").'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Paid").'</td>';
|
||||
@ -926,6 +932,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$societestatic->code_client = $obj->code_client;
|
||||
$societestatic->code_fournisseur = $obj->code_fournisseur;
|
||||
print '<td>'.$societestatic->getNomUrl(1, 'supplier', 44).'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->date_lim_reglement),'day').'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
print '<td align="right">'.price($obj->am).'</td>';
|
||||
@ -939,6 +946,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToPay").': '.price($total_ttc-$totalam).')</font> </td>';
|
||||
print '<td> </td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($total).'</td>';
|
||||
print '<td align="right">'.price($total_ttc).'</td>';
|
||||
print '<td align="right">'.price($totalam).'</td>';
|
||||
@ -947,7 +955,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
}
|
||||
else
|
||||
{
|
||||
$colspan=5;
|
||||
$colspan=6;
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
|
||||
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user