From 1dfb0cac4ed8ca11c93d52e2fe7d869e08f47c54 Mon Sep 17 00:00:00 2001 From: a-schild Date: Tue, 7 Jul 2015 18:08:10 +0200 Subject: [PATCH 01/12] Allow filtering on date fields for supplier factures --- htdocs/fourn/facture/impayees.php | 44 +++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 83d4b830c5f..826393970b8 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Vinicius Nogueira * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2015 Andre Schild * * 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 @@ -56,6 +57,16 @@ $search_company = GETPOST('search_company','alpha'); $search_amount_no_tax = GETPOST('search_amount_no_tax','alpha'); $search_amount_all_tax = GETPOST('search_amount_all_tax','alpha'); +$op1month=GETPOST('op1month'); +$op1day=GETPOST('op1day'); +$op1year=GETPOST('op1year'); +$filter_op1=GETPOST('filter_op1'); + +$op2month=GETPOST('op2month'); +$op2day=GETPOST('op2day'); +$op2year=GETPOST('op2year'); +$filter_op2=GETPOST('filter_op2'); + $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } $offset = $conf->liste_limit * $page; @@ -71,6 +82,14 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_company=""; $search_amount_no_tax=""; $search_amount_all_tax=""; + $op1month=""; + $op1day=""; + $op1year=""; + $filter_op1=""; + $op2month=""; + $op2day=""; + $op2year=""; + $filter_op2=""; } /* @@ -78,6 +97,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both */ $now=dol_now(); +$form=new Form($db); llxHeader('',$langs->trans("BillsSuppliersUnpaid")); @@ -101,6 +121,10 @@ if ($user->rights->fournisseur->facture->lire) $sql.= " WHERE f.entity = ".$conf->entity; $sql.= " AND f.fk_soc = s.rowid"; $sql.= " AND f.paye = 0 AND f.fk_statut = 1"; + $filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year); + if (! empty($filter_op1) && $filter_op1 != -1 && $filter_date1 != '') $sql.= " AND f.datef ".$filter_op1." '".$db->idate($filter_date1)."'"; + $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); + if (! empty($filter_op2) && $filter_op2 != -1 && $filter_date2 != '') $sql.= " AND f.date_lim_reglement ".$filter_op2." '".$db->idate($filter_date2)."'"; if ($option == 'late') $sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'"; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql .= " AND s.rowid = ".$socid; @@ -168,6 +192,10 @@ if ($user->rights->fournisseur->facture->lire) if ($search_company) $param.='&search_company='.urlencode($search_company); if ($search_amount_no_tax) $param.='&search_amount_no_tax='.urlencode($search_amount_no_tax); if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax); + if (! empty($filter_op1) && $filter_op1 != -1) $param.='&filter_op1='.urlencode($filter_op1); + if ($filter_date1 != '') $param.='&op1day='.$op1day.'&op1month='.$op1month.'&op1year='.$op1year; + if (! empty($filter_op2) && $filter_op2 != -1) $param.='&filter_op2='.urlencode($filter_op2); + if ($filter_date2 != '') $param.='&op2day='.$op2day.'&op2month='.$op2month.'&op2year='.$op2year; $param.=($option?"&option=".$option:""); if (! empty($late)) $param.='&late='.urlencode($late); @@ -206,8 +234,20 @@ if ($user->rights->fournisseur->facture->lire) print ''; print ''; print ''; - print ' '; - print ' '; + print ''; + $arrayofoperators=array('<'=>'<','>'=>'>'); + print $form->selectarray('filter_op1',$arrayofoperators,$filter_op1,1); + print ' '; + $filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year); + print $form->select_date($filter_date1,'op1',0,0,1); + print ''; + print ''; + $arrayofoperators=array('<'=>'<','>'=>'>'); + print $form->selectarray('filter_op2',$arrayofoperators,$filter_op2,1); + print ' '; + $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); + print $form->select_date($filter_date2,'op2',0,0,1); + print ''; print ''; print ''; print ''; From 134f13c63f1f1f325c63f7ec3c1a6fb654b432b2 Mon Sep 17 00:00:00 2001 From: a-schild Date: Tue, 7 Jul 2015 18:17:22 +0200 Subject: [PATCH 02/12] Removed conflict code from merge/checkout --- htdocs/fourn/facture/paiement.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 20cf8f250bd..ba3f82c78e0 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -424,8 +424,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Bouton Enregistrer if ($action != 'add_paiement') { - print '
'.$langs->trans("ClosePaidInvoicesAutomatically"); - print '
'; + print '

'.$langs->trans("ClosePaidInvoicesAutomatically"); + print '
'; } // Form to confirm payment @@ -545,7 +545,7 @@ if (empty($action)) print_liste_field_titre($langs->trans('Account'),$_SERVER["PHP_SELF"],'ba.label','',$paramlist,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Amount'),$_SERVER["PHP_SELF"],'p.amount','',$paramlist,'align="right"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans('Invoice'),$_SERVER["PHP_SELF"],'ref_supplier','',$paramlist,'',$sortfield,$sortorder); - print_liste_field_titre(''); + print ' '; print "\n"; // Lines for filters fields From 0fe39d4e4b16467db2d276e0e7901854c439bda3 Mon Sep 17 00:00:00 2001 From: a-schild Date: Tue, 7 Jul 2015 18:33:09 +0200 Subject: [PATCH 03/12] Show due date when creating payments, so user can select the bills to pay --- htdocs/fourn/facture/paiement.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index ba3f82c78e0..f82dd93904b 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -5,11 +5,9 @@ * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin -<<<<<<< HEAD * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> -======= - * Copyright (C) 2015 Marcos García ->>>>>>> refs/remotes/origin/3.6 + * Copyright (C) 2015 Marcos García + * Copyright (C) 2015 Andre Schild * * 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 @@ -322,7 +320,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie /* * Autres factures impayees */ - $sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef as df'; + $sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef as df, date_lim_reglement as duedate'; $sql.= ', SUM(pf.amount) as am'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid'; @@ -330,7 +328,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $sql.= ' AND f.fk_soc = '.$object->socid; $sql.= ' AND f.paye = 0'; $sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee - $sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef'; + $sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef, f.date_lim_reglement'; $resql = $db->query($sql); if ($resql) { @@ -356,6 +354,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''.$langs->trans('Ref').''; print ''.$langs->trans('RefSupplier').''; print ''.$langs->trans('Date').''; + print ''.$langs->trans('DateMaxPayment').''; print ''.$langs->trans('AmountTTC').''; print ''.$langs->trans('AlreadyPaid').''; print ''.$langs->trans('RemainderToPay').''; @@ -386,6 +385,15 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { print '!!!'; } + if ($objp->duedate > 0 ) + { + print ''; + print dol_print_date($db->jdate($objp->duedate), 'day').''; + } + else + { + print '!!!'; + } print ''.price($objp->total_ttc).''; print ''.price($objp->am).''; print ''.price($objp->total_ttc - $objp->am).''; @@ -404,7 +412,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { // Print total print ''; - print ''.$langs->trans('TotalTTC').':'; + print ''.$langs->trans('TotalTTC').':'; print ''.price($total_ttc).''; print ''.price($totalrecu).''; print ''.price($total_ttc - $totalrecu).''; From 2999d0b37a5ee28c51a8bee93c0175ba37d74a45 Mon Sep 17 00:00:00 2001 From: a-schild Date: Wed, 8 Jul 2015 08:58:30 +0200 Subject: [PATCH 04/12] Show due days in not payed supplier bills --- htdocs/fourn/facture/impayees.php | 32 +++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 826393970b8..b9fb072f437 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -56,6 +56,7 @@ $search_ref_supplier = GETPOST('search_ref_supplier','alpha'); $search_company = GETPOST('search_company','alpha'); $search_amount_no_tax = GETPOST('search_amount_no_tax','alpha'); $search_amount_all_tax = GETPOST('search_amount_all_tax','alpha'); +$search_duedays = GETPOST('search_duedays','alpha'); $op1month=GETPOST('op1month'); $op1day=GETPOST('op1day'); @@ -90,6 +91,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $op2day=""; $op2year=""; $filter_op2=""; + $duedays=""; } /* @@ -111,6 +113,7 @@ if ($user->rights->fournisseur->facture->lire) $sql = "SELECT s.rowid as socid, s.nom as name,"; $sql.= " f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc,"; $sql.= " f.datef as df, f.date_lim_reglement as datelimite, "; + $sql.= " DATEDIFF(f.date_lim_reglement, NOW()) as duedays, "; $sql.= " f.paye as paye, f.rowid as facid, f.fk_statut"; $sql.= " ,sum(pf.amount) as am"; if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user "; @@ -153,11 +156,16 @@ if ($user->rights->fournisseur->facture->lire) $sql .= " AND s.nom LIKE '%".$search_company."%'"; } + if ($search_duedays) + { + $sql .= " AND DATEDIFF(f.date_lim_reglement, NOW()) = '".$search_duedays."'"; + } + if ($search_amount_no_tax) { $sql .= " AND f.total_ht = '".$search_amount_no_tax."'"; } - + if ($search_amount_all_tax) { $sql .= " AND f.total_ttc = '".$search_amount_all_tax."'"; @@ -196,6 +204,7 @@ if ($user->rights->fournisseur->facture->lire) if ($filter_date1 != '') $param.='&op1day='.$op1day.'&op1month='.$op1month.'&op1year='.$op1year; if (! empty($filter_op2) && $filter_op2 != -1) $param.='&filter_op2='.urlencode($filter_op2); if ($filter_date2 != '') $param.='&op2day='.$op2day.'&op2month='.$op2month.'&op2year='.$op2year; + if ($search_duedays) $param.='&search_duedays='.urlencode($search_duedays); $param.=($option?"&option=".$option:""); if (! empty($late)) $param.='&late='.urlencode($late); @@ -221,6 +230,7 @@ if ($user->rights->fournisseur->facture->lire) print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"f.ref_supplier","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DueDays"),$_SERVER["PHP_SELF"],"duedays","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","",$param,'align="right"',$sortfield,$sortorder); @@ -248,6 +258,9 @@ if ($user->rights->fournisseur->facture->lire) $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); print $form->select_date($filter_date2,'op2',0,0,1); print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -274,6 +287,16 @@ if ($user->rights->fournisseur->facture->lire) print ""; $classname = "impayee"; + if ($objp->duedays <0) + { + $overdueclassstart=""; + $overdueclassend=""; + } + else + { + $overdueclassstart=""; + $overdueclassend=""; + } print ''; $facturestatic->id=$objp->facid; @@ -284,9 +307,10 @@ if ($user->rights->fournisseur->facture->lire) print ''.dol_trunc($objp->ref_supplier,12).''; print ''.dol_print_date($db->jdate($objp->df),'day')."\n"; - print ''.dol_print_date($db->jdate($objp->datelimite),'day'); + print ''.$overdueclassstart.dol_print_date($db->jdate($objp->datelimite),'day'); if ($objp->datelimite && $db->jdate($objp->datelimite) < ($now - $conf->facture->fournisseur->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late")); - print "\n"; + print $overdueclassend."\n"; + print "".$overdueclassstart.$objp->duedays.$overdueclassend.""; print ''; $companystatic->id=$objp->socid; @@ -312,7 +336,7 @@ if ($user->rights->fournisseur->facture->lire) } print ''; - print "".$langs->trans("Total").": "; + print "".$langs->trans("Total").": "; print "".price($total_ht).""; print "".price($total_ttc).""; print "".price($total_paid).""; From 8353e1d462b309455ac6d3ad201c3d9f3ee27dde Mon Sep 17 00:00:00 2001 From: a-schild Date: Wed, 8 Jul 2015 09:18:04 +0200 Subject: [PATCH 05/12] Show due days in make payments --- htdocs/fourn/facture/paiement.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index f82dd93904b..35d1f9311e4 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -321,6 +321,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie * Autres factures impayees */ $sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef as df, date_lim_reglement as duedate'; + $sql.= ', DATEDIFF(f.date_lim_reglement, NOW()) as duedays'; $sql.= ', SUM(pf.amount) as am'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid'; @@ -355,6 +356,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''.$langs->trans('RefSupplier').''; print ''.$langs->trans('Date').''; print ''.$langs->trans('DateMaxPayment').''; + print ''.$langs->trans('DueDays').''; print ''.$langs->trans('AmountTTC').''; print ''.$langs->trans('AlreadyPaid').''; print ''.$langs->trans('RemainderToPay').''; @@ -394,6 +396,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { print '!!!'; } + print ''.$objp->duedays.''; print ''.price($objp->total_ttc).''; print ''.price($objp->am).''; print ''.price($objp->total_ttc - $objp->am).''; @@ -412,7 +415,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { // Print total print ''; - print ''.$langs->trans('TotalTTC').':'; + print ''.$langs->trans('TotalTTC').':'; print ''.price($total_ttc).''; print ''.price($totalrecu).''; print ''.price($total_ttc - $totalrecu).''; From 43897d913e248fd271dd277def9a570ae44b15ce Mon Sep 17 00:00:00 2001 From: a-schild Date: Wed, 8 Jul 2015 09:44:59 +0200 Subject: [PATCH 06/12] Corrected center to html5 css class instead of center tag --- htdocs/fourn/facture/paiement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 35d1f9311e4..09ea8fa23b6 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -435,8 +435,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Bouton Enregistrer if ($action != 'add_paiement') { - print '

'.$langs->trans("ClosePaidInvoicesAutomatically"); - print '
'; + print '
'.$langs->trans("ClosePaidInvoicesAutomatically"); + print '
'; } // Form to confirm payment From 64d4a08dc6dc46187b6372e1768be36881ada505 Mon Sep 17 00:00:00 2001 From: a-schild Date: Wed, 8 Jul 2015 09:58:51 +0200 Subject: [PATCH 07/12] Added translations, corrected title printing in the new way --- htdocs/fourn/facture/paiement.php | 2 +- htdocs/langs/de_DE/bills.lang | 1 + htdocs/langs/en_US/bills.lang | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 09ea8fa23b6..9a7f02eceda 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -556,7 +556,7 @@ if (empty($action)) print_liste_field_titre($langs->trans('Account'),$_SERVER["PHP_SELF"],'ba.label','',$paramlist,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Amount'),$_SERVER["PHP_SELF"],'p.amount','',$paramlist,'align="right"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans('Invoice'),$_SERVER["PHP_SELF"],'ref_supplier','',$paramlist,'',$sortfield,$sortorder); - print ' '; + print_liste_field_titre(''); print "\n"; // Lines for filters fields diff --git a/htdocs/langs/de_DE/bills.lang b/htdocs/langs/de_DE/bills.lang index 9b743010407..70223f85e4e 100644 --- a/htdocs/langs/de_DE/bills.lang +++ b/htdocs/langs/de_DE/bills.lang @@ -213,6 +213,7 @@ RelatedCommercialProposals=Verknüpfte Angebote MenuToValid=Zur Freigabe DateMaxPayment=Zahlungsziel DateEcheance=Zahlungsfrist (Limit) +DueDays=Tage bis fällig DateInvoice=Rechnungsdatum NoInvoice=Keine Rechnung ClassifyBill=Rechnung einordnen diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 4f1512a431d..be3bc24b652 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -213,6 +213,7 @@ RelatedCommercialProposals=Related commercial proposals MenuToValid=To valid DateMaxPayment=Payment due before DateEcheance=Due date limit +DueDays=Due days DateInvoice=Invoice date NoInvoice=No invoice ClassifyBill=Classify invoice From 4a19c14034ff512dd8311df1e98fca0331c7a7d2 Mon Sep 17 00:00:00 2001 From: a-schild Date: Mon, 13 Feb 2017 09:33:01 +0100 Subject: [PATCH 08/12] Use correct numeric format for all soldes --- htdocs/accountancy/bookkeeping/balance.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 15345a99b72..bb7d049f08e 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -255,9 +255,9 @@ else { print '' . length_accountg($line->numero_compte) . ''; print '' . $description . ''; - print '' . number_format($line->debit, 2, ',', ' ') . ''; - print '' . number_format($line->credit, 2, ',', ' ') . ''; - print '' . number_format($line->credit - $line->debit, 2, ',', ' ') . ''; + print '' . price($line->debit, 2, ',', ' ') . ''; + print '' . price($line->credit, 2, ',', ' ') . ''; + print '' . price($line->credit - $line->debit, 2, ',', ' ') . ''; print '' . $link; print ''; print "\n"; From 89c80a45c285a52d6c1303a2203b281e8aeee5a6 Mon Sep 17 00:00:00 2001 From: a-schild Date: Mon, 13 Feb 2017 09:34:35 +0100 Subject: [PATCH 09/12] Use correct numeric format for all soldes --- htdocs/accountancy/bookkeeping/balance.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index bb7d049f08e..53eaaba7c9c 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -255,9 +255,9 @@ else { print '' . length_accountg($line->numero_compte) . ''; print '' . $description . ''; - print '' . price($line->debit, 2, ',', ' ') . ''; - print '' . price($line->credit, 2, ',', ' ') . ''; - print '' . price($line->credit - $line->debit, 2, ',', ' ') . ''; + print '' . price($line->debit) . ''; + print '' . price($line->credit) . ''; + print '' . price($line->credit - $line->debit) . ''; print '' . $link; print ''; print "\n"; From a12a094172256eb9b704e01490516684452fa4da Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 15 Feb 2017 01:11:25 +0100 Subject: [PATCH 10/12] $usemargins not used on global because it's defined on the tpl file (line 42) --- htdocs/core/tpl/objectline_view.tpl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 891694670f4..1971532433a 100755 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -36,7 +36,7 @@ * $type, $text, $description, $line */ -global $forceall, $senderissupplier, $inputalsopricewithtax, $usemargins, $outputalsopricetotalwithtax; +global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax; $usemargins=0; if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1; @@ -46,7 +46,7 @@ if (empty($forceall)) $forceall=0; if (empty($senderissupplier)) $senderissupplier=0; if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0; if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0; -if (empty($usemargins)) $usemargins=0; + ?> From 692dd0b5dbb9fbb5c51215b5443a84c39d70fd3a Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 15 Feb 2017 01:22:20 +0100 Subject: [PATCH 11/12] contact email not display on tooltip field not initialised --- htdocs/contact/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 3fbd4fa462d..6091171dfe6 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -659,6 +659,7 @@ while ($i < min($num,$limit)) $contactstatic->id=$obj->cidp; $contactstatic->statut=$obj->statut; $contactstatic->poste=$obj->poste; + $contactstatic->email=$obj->email; $contactstatic->phone_pro=$obj->phone_pro; $contactstatic->phone_perso=$obj->phone_perso; $contactstatic->phone_mobile=$obj->phone_mobile; From 90770a1f232d9731923eb8a1b26dd033c4dbbd12 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Fri, 17 Feb 2017 10:47:29 +0100 Subject: [PATCH 12/12] Accounting code not display on tooltip --- htdocs/societe/list.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 4a0be451c45..cc5ab706fb0 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -904,8 +904,12 @@ while ($i < min($num, $limit)) $companystatic->fournisseur=$obj->fournisseur; $companystatic->code_client=$obj->code_client; $companystatic->code_fournisseur=$obj->code_fournisseur; - $companystatic->fk_prospectlevel=$obj->fk_prospectlevel; - $companystatic->name_alias=$obj->name_alias; + + $companystatic->code_compta_client=$obj->code_compta; + $companystatic->code_compta_fournisseur=$obj->code_compta_fournisseur; + + $companystatic->fk_prospectlevel=$obj->fk_prospectlevel; + $companystatic->name_alias=$obj->name_alias; print ""; if (! empty($arrayfields['s.nom']['checked']))