From 192fdbdcc4383dcaf55b4235603b57d5c0e3eb70 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Nov 2015 23:10:12 +0100 Subject: [PATCH] Minor look uniformization --- htdocs/comm/propal/list.php | 2 +- htdocs/compta/bank/search.php | 10 +- htdocs/compta/charges/index.php | 169 ++++++++++++++++---------------- htdocs/compta/index.php | 2 +- htdocs/langs/en_US/compta.lang | 12 ++- 5 files changed, 105 insertions(+), 90 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index b3ca4cd6ae0..2237f41b299 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -322,7 +322,7 @@ if ($result) print ''; } - print ''; + print '
'."\n"; print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder); diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index b585f48565f..0fd5336af7e 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -179,19 +179,23 @@ if ($resql) print ''."\n"; print ''."\n"; + $moreforfilter = ''; + + $moreforfilter.='
'; $moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' '; $moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= ' - '; $moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= '
'; - - if ($moreforfilter) { + if ($moreforfilter) + { print '
'; print $moreforfilter; print '
'."\n"; } - print '
'."\n"; + print '
'."\n"; print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'b.rowid','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('DateOperationShort'),$_SERVER['PHP_SELF'],'b.dateo','',$param,'align="center"',$sortfield,$sortorder); diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 69b95d16e03..e192d1e9d82 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -85,87 +85,6 @@ if (GETPOST("mode") != 'sconly') print "
"; } -// Payment Salary -if ($conf->salaries->enabled) -{ - if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') - { - $sal = new PaymentSalary($db); - - print load_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); - - $sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, u.salary as current_salary"; - $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s, ".MAIN_DB_PREFIX."user as u"; - $sql.= " WHERE s.entity IN (".getEntity('user',1).")"; - $sql.= " AND u.rowid = s.fk_user"; - if ($year > 0) - { - $sql.= " AND (s.datesp between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; - $sql.= " OR s.dateep between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."')"; - } - if (preg_match('/^s\./',$sortfield)) $sql.= $db->order($sortfield,$sortorder); - - $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows($result); - $i = 0; - $total = 0 ; - print '
'; - print ''; - print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.dateep","",$param,'width="140px"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"s.rowid","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"s.datep","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); - print "\n"; - $var=1; - while ($i < $num) - { - $obj = $db->fetch_object($result); - - $total = $total + $obj->amount; - - $var=!$var; - print ""; - - print ''."\n"; - - print "\n"; - - print '"; - - // Ref payment - $sal_static->id=$obj->rowid; - $sal_static->ref=$obj->rowid; - print '\n"; - - print '\n"; - print '"; - print "\n"; - - $i++; - } - print ''; - print '"; - print ''; - print ''; - print '"; - print ""; - - print "
'.dol_print_date($db->jdate($obj->dateep),'day').'".$obj->label."'.($obj->salary?price($obj->salary):'')."'.$sal_static->getNomUrl(1)."'.dol_print_date($db->jdate($obj->datep),'day')."'.price($obj->amount)."
'.$langs->trans("Total").''."  '.price($total)."
"; - $db->free($result); - - print "
"; - } - else - { - dol_print_error($db); - } - } -} - if ($conf->tax->enabled) { @@ -356,7 +275,8 @@ if ($conf->tax->enabled) } } } -//localtax + +// Localtax if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { $j=1; @@ -460,6 +380,91 @@ while($j<$numlt) } + +// Payment Salary +if ($conf->salaries->enabled) +{ + if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') + { + $sal = new PaymentSalary($db); + + print '
'; + print load_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); + + $sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, u.salary as current_salary"; + $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s, ".MAIN_DB_PREFIX."user as u"; + $sql.= " WHERE s.entity IN (".getEntity('user',1).")"; + $sql.= " AND u.rowid = s.fk_user"; + if ($year > 0) + { + $sql.= " AND (s.datesp between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; + $sql.= " OR s.dateep between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."')"; + } + if (preg_match('/^s\./',$sortfield)) $sql.= $db->order($sortfield,$sortorder); + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; + $total = 0 ; + print ''; + print ''; + print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.dateep","",$param,'width="140px"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"s.rowid","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"s.datep","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); + print "\n"; + $var=1; + while ($i < $num) + { + $obj = $db->fetch_object($result); + + $total = $total + $obj->amount; + + $var=!$var; + print ""; + + print ''."\n"; + + print "\n"; + + print '"; + + // Ref payment + $sal_static->id=$obj->rowid; + $sal_static->ref=$obj->rowid; + print '\n"; + + print '\n"; + print '"; + print "\n"; + + $i++; + } + print ''; + print '"; + print ''; + print ''; + print '"; + print ""; + + print "
'.dol_print_date($db->jdate($obj->dateep),'day').'".$obj->label."'.($obj->salary?price($obj->salary):'')."'.$sal_static->getNomUrl(1)."'.dol_print_date($db->jdate($obj->datep),'day')."'.price($obj->amount)."
'.$langs->trans("Total").''."  '.price($total)."
"; + $db->free($result); + + print "
"; + } + else + { + dol_print_error($db); + } + } +} + + + llxFooter(); $db->close(); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index fea0708e2a8..099a3063127 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -580,7 +580,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ''.$langs->trans("DateDue").''; print ''.$langs->trans("AmountTTC").''; print ''.$langs->trans("Paid").''; - print ' '; + print ' '; print ''; if ($num) { diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 20c0a144121..c7cbb6d0a9b 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -83,12 +83,18 @@ DatePayment=Payment date DateStartPeriod=Date start period DateEndPeriod=Date end period NewVATPayment=New VAT payment -newLT2PaymentES=New IRPF payment +newLT1Payment=New tax 2 payment +newLT2Payment=New tax 3 payment +LT1Payment=Tax 2 payment +LT1Payments=Tax 2 payments +LT2Payment=Tax 3 payment +LT2Payments=Tax 3 payments newLT1PaymentES=New RE payment -LT2PaymentES=IRPF Payment -LT2PaymentsES=IRPF Payments +newLT2PaymentES=New IRPF payment LT1PaymentES=RE Payment LT1PaymentsES=RE Payments +LT2PaymentES=IRPF Payment +LT2PaymentsES=IRPF Payments VATPayment=VAT Payment VATPayments=VAT Payments VATRefund=VAT Refund