forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -50,8 +50,8 @@ $label=GETPOST("label", "alpha");
|
|||||||
$sens=GETPOST("sens", "int");
|
$sens=GETPOST("sens", "int");
|
||||||
$amount=GETPOST("amount", "alpha");
|
$amount=GETPOST("amount", "alpha");
|
||||||
$paymenttype=GETPOST("paymenttype", "int");
|
$paymenttype=GETPOST("paymenttype", "int");
|
||||||
$accountancy_code=GETPOST("accountancy_code", "int");
|
$accountancy_code=GETPOST("accountancy_code", "alpha");
|
||||||
$subledger_account=GETPOST("subledger_account", "int");
|
$subledger_account=GETPOST("subledger_account", "alpha");
|
||||||
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
|
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@@ -114,8 +114,8 @@ if (empty($reshook))
|
|||||||
$object->num_payment=GETPOST("num_payment", 'alpha');
|
$object->num_payment=GETPOST("num_payment", 'alpha');
|
||||||
$object->fk_user_author=$user->id;
|
$object->fk_user_author=$user->id;
|
||||||
|
|
||||||
$object->accountancy_code=GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "int") : "";
|
$object->accountancy_code=GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "alpha") : "";
|
||||||
$object->subledger_account=GETPOST("subledger_account") > 0 ? GETPOST("subledger_account", "int") : "";
|
$object->subledger_account=GETPOST("subledger_account") > 0 ? GETPOST("subledger_account", "alpha") : "";
|
||||||
|
|
||||||
$object->sens=GETPOST('sens');
|
$object->sens=GETPOST('sens');
|
||||||
$object->fk_project= GETPOST('fk_project', 'int');
|
$object->fk_project= GETPOST('fk_project', 'int');
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ if ($resql)
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.statut", "", $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -922,7 +922,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
if($mois>12) {$annee_decalage=$annee+1;}
|
if($mois>12) {$annee_decalage=$annee+1;}
|
||||||
$case = strftime("%Y-%m", dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage));
|
$case = strftime("%Y-%m", dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage));
|
||||||
|
|
||||||
print '<td align="right"> ';
|
print '<td class="right"> ';
|
||||||
if ($modecompta == 'BOOKKEEPING')
|
if ($modecompta == 'BOOKKEEPING')
|
||||||
{
|
{
|
||||||
if (isset($decaiss[$case]) && $decaiss[$case] != 0)
|
if (isset($decaiss[$case]) && $decaiss[$case] != 0)
|
||||||
@@ -943,7 +943,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print '<td align="right" class="borderrightlight"> ';
|
print '<td class="borderrightlight right"> ';
|
||||||
if ($modecompta == 'BOOKKEEPING')
|
if ($modecompta == 'BOOKKEEPING')
|
||||||
{
|
{
|
||||||
if (isset($encaiss[$case]))
|
if (isset($encaiss[$case]))
|
||||||
@@ -978,8 +978,8 @@ print '</td>';
|
|||||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||||
{
|
{
|
||||||
$nbcols+=2;
|
$nbcols+=2;
|
||||||
print '<td align="right">'.(isset($totsorties[$annee])?price(price2num($totsorties[$annee], 'MT')):' ').'</td>';
|
print '<td class="right">'.(isset($totsorties[$annee])?price(price2num($totsorties[$annee], 'MT')):' ').'</td>';
|
||||||
print '<td align="right" style="border-right: 1px solid #DDD">'.(isset($totentrees[$annee])?price(price2num($totentrees[$annee], 'MT')):' ').'</td>';
|
print '<td class="right" style="border-right: 1px solid #DDD">'.(isset($totentrees[$annee])?price(price2num($totentrees[$annee], 'MT')):' ').'</td>';
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -993,7 +993,7 @@ print "</tr>\n";
|
|||||||
print '<tr class="liste_total"><td>'.$langs->trans("AccountingResult").'</td>';
|
print '<tr class="liste_total"><td>'.$langs->trans("AccountingResult").'</td>';
|
||||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||||
{
|
{
|
||||||
print '<td align="right" colspan="2" class="borderrightlight"> ';
|
print '<td colspan="2" class="borderrightlight right"> ';
|
||||||
if (isset($totentrees[$annee]) || isset($totsorties[$annee]))
|
if (isset($totentrees[$annee]) || isset($totsorties[$annee]))
|
||||||
{
|
{
|
||||||
$in=(isset($totentrees[$annee])?price2num($totentrees[$annee], 'MT'):0);
|
$in=(isset($totentrees[$annee])?price2num($totentrees[$annee], 'MT'):0);
|
||||||
|
|||||||
@@ -228,18 +228,18 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th class="liste_titre">'.$langs->trans("AccountingCategory").'</th>';
|
print '<th class="liste_titre">'.$langs->trans("AccountingCategory").'</th>';
|
||||||
print '<th class="liste_titre"></th>';
|
print '<th class="liste_titre"></th>';
|
||||||
print '<th class="liste_titre" align="right">'.$langs->trans("PreviousPeriod").'</th>';
|
print '<th class="liste_titre right">'.$langs->trans("PreviousPeriod").'</th>';
|
||||||
print '<th class="liste_titre" align="right">'.$langs->trans("SelectedPeriod").'</th>';
|
print '<th class="liste_titre right">'.$langs->trans("SelectedPeriod").'</th>';
|
||||||
foreach($months as $k => $v){
|
foreach($months as $k => $v){
|
||||||
if (($k+1) >= $date_startmonth)
|
if (($k+1) >= $date_startmonth)
|
||||||
{
|
{
|
||||||
print '<th class="liste_titre width50" align="right" >'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach($months as $k => $v){
|
foreach($months as $k => $v){
|
||||||
if (($k+1) < $date_startmonth)
|
if (($k+1) < $date_startmonth)
|
||||||
{
|
{
|
||||||
print '<th class="liste_titre width50" align="right" >'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@@ -493,15 +493,15 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right">' . price($totCat['NP']) . '</td>';
|
print '<td class="right">' . price($totCat['NP']) . '</td>';
|
||||||
print '<td align="right">' . price($totCat['N']) . '</td>';
|
print '<td class="right">' . price($totCat['N']) . '</td>';
|
||||||
|
|
||||||
// Each month
|
// Each month
|
||||||
foreach($totCat['M'] as $k => $v){
|
foreach($totCat['M'] as $k => $v){
|
||||||
if (($k+1) >= $date_startmonth) print '<td align="right">' . price($v) . '</td>';
|
if (($k+1) >= $date_startmonth) print '<td class="right">' . price($v) . '</td>';
|
||||||
}
|
}
|
||||||
foreach($totCat['M'] as $k => $v){
|
foreach($totCat['M'] as $k => $v){
|
||||||
if (($k+1) < $date_startmonth) print '<td align="right">' . price($v) . '</td>';
|
if (($k+1) < $date_startmonth) print '<td class="right">' . price($v) . '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@@ -523,8 +523,8 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
print ' - ';
|
print ' - ';
|
||||||
print $cpt['account_label'];
|
print $cpt['account_label'];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">' . price($resultNP) . '</td>';
|
print '<td class="right">' . price($resultNP) . '</td>';
|
||||||
print '<td align="right">' . price($resultN) . '</td>';
|
print '<td class="right">' . price($resultN) . '</td>';
|
||||||
|
|
||||||
// Make one call for each month
|
// Make one call for each month
|
||||||
foreach($months as $k => $v)
|
foreach($months as $k => $v)
|
||||||
@@ -532,7 +532,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
if (($k+1) >= $date_startmonth)
|
if (($k+1) >= $date_startmonth)
|
||||||
{
|
{
|
||||||
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
||||||
print '<td align="right">' . price($resultM) . '</td>';
|
print '<td class="right">' . price($resultM) . '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach($months as $k => $v)
|
foreach($months as $k => $v)
|
||||||
@@ -540,7 +540,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
if (($k+1) < $date_startmonth)
|
if (($k+1) < $date_startmonth)
|
||||||
{
|
{
|
||||||
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
||||||
print '<td align="right">' . price($resultM) . '</td>';
|
print '<td class="right">' . price($resultM) . '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@@ -194,9 +194,9 @@ if ($result)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -204,11 +204,11 @@ if ($result)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -269,8 +269,8 @@ if ($result)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Amount
|
// Amount
|
||||||
print "<td align=\"right\">".price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount).'</td>';
|
||||||
print "<td></td>";
|
print '<td></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$total = $total + $obj->amount;
|
$total = $total + $obj->amount;
|
||||||
@@ -281,7 +281,7 @@ if ($result)
|
|||||||
$colspan=5;
|
$colspan=5;
|
||||||
if (! empty($conf->banque->enabled)) $colspan++;
|
if (! empty($conf->banque->enabled)) $colspan++;
|
||||||
print '<tr class="liste_total"><td colspan="'.$colspan.'" class="liste_total">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="'.$colspan.'" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||||
print '<td class="liste_total" align="right">'.price($total)."</td>";
|
print '<td class="liste_total right">'.price($total)."</td>";
|
||||||
print "<td></td></tr>";
|
print "<td></td></tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@@ -218,9 +218,9 @@ print '<div class="div-table-responsive-no-min">';
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre" height="24">';
|
print '<tr class="liste_titre" height="24">';
|
||||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Number").'</td>';
|
print '<td class="right">'.$langs->trans("Number").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("AmountTotal").'</td>';
|
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("AmountAverage").'</td>';
|
print '<td class="right">'.$langs->trans("AmountAverage").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$oldyear=0;
|
$oldyear=0;
|
||||||
@@ -234,17 +234,17 @@ foreach ($data as $val)
|
|||||||
|
|
||||||
print '<tr class="oddeven" height="24">';
|
print '<tr class="oddeven" height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'">'.$oldyear.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'">'.$oldyear.'</a></td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven" height="24">';
|
print '<tr class="oddeven" height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a></td>';
|
||||||
print '<td align="right">'.$val['nb'].'</td>';
|
print '<td class="right">'.$val['nb'].'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$oldyear=$year;
|
$oldyear=$year;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ if ($id > 0)
|
|||||||
print $langs->trans('PaymentMode');
|
print $langs->trans('PaymentMode');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editmode')
|
if ($action != 'editmode')
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editmode') {
|
if ($action == 'editmode') {
|
||||||
@@ -555,7 +555,7 @@ if ($id > 0)
|
|||||||
print $langs->trans('BankAccount');
|
print $langs->trans('BankAccount');
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($action != 'editbankaccount' && $user->rights->tax->charges->creer)
|
if ($action != 'editbankaccount' && $user->rights->tax->charges->creer)
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editbankaccount') {
|
if ($action == 'editbankaccount') {
|
||||||
@@ -608,9 +608,9 @@ if ($id > 0)
|
|||||||
print '<td>'.$langs->trans("Date").'</td>';
|
print '<td>'.$langs->trans("Date").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
if (! empty($conf->banque->enabled)) {
|
if (! empty($conf->banque->enabled)) {
|
||||||
print '<td class="liste_titre" align="right">' . $langs->trans('BankAccount') . '</td>';
|
print '<td class="liste_titre right">' . $langs->trans('BankAccount') . '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
@@ -639,12 +639,12 @@ if ($id > 0)
|
|||||||
$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($bankaccountstatic->id)
|
if ($bankaccountstatic->id)
|
||||||
print $bankaccountstatic->getNomUrl(1, 'transactions');
|
print $bankaccountstatic->getNomUrl(1, 'transactions');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price($objp->amount)."</td>\n";
|
print '<td class="right">'.price($objp->amount)."</td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$totalpaye += $objp->amount;
|
$totalpaye += $objp->amount;
|
||||||
$i++;
|
$i++;
|
||||||
@@ -658,14 +658,14 @@ if ($id > 0)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("AlreadyPaid")." :</td><td align=\"right\">".price($totalpaye)."</td></tr>\n";
|
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AlreadyPaid")." :</td><td class=\"right\">".price($totalpaye)."</td></tr>\n";
|
||||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("AmountExpected")." :</td><td align=\"right\">".price($object->amount)."</td></tr>\n";
|
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AmountExpected")." :</td><td class=\"right\">".price($object->amount)."</td></tr>\n";
|
||||||
|
|
||||||
$resteapayer = $object->amount - $totalpaye;
|
$resteapayer = $object->amount - $totalpaye;
|
||||||
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||||
|
|
||||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("RemainderToPay")." :</td>";
|
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay")." :</td>";
|
||||||
print '<td align="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n";
|
print '<td class="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|||||||
@@ -203,17 +203,17 @@ if ($resql)
|
|||||||
// Period end date
|
// Period end date
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
print '<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
// Status
|
// Status
|
||||||
print '<td class="liste_titre maxwidthonsmartphone" align="right">';
|
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||||
$liststatus=array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid"));
|
$liststatus=array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid"));
|
||||||
print $form->selectarray('search_status', $liststatus, $search_status, 1);
|
print $form->selectarray('search_status', $liststatus, $search_status, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -221,12 +221,12 @@ if ($resql)
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "id", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "id", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "cs.libelle", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "cs.libelle", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "periode", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "periode", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DateDue", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DateDue", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cs.paye", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cs.paye", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<td align="right" width="100">'.price($obj->amount).'</td>';
|
print '<td class="right" width="100">'.price($obj->amount).'</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
||||||
$totalarray['totalttc'] += $obj->amount;
|
$totalarray['totalttc'] += $obj->amount;
|
||||||
@@ -275,7 +275,7 @@ if ($resql)
|
|||||||
// Due date
|
// Due date
|
||||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
||||||
|
|
||||||
print '<td align="right" class="nowrap">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
print '<td class="nowrap right">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
||||||
|
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ if ($resql)
|
|||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td align="right">'.price($totalarray['totalttc']).'</td>';
|
print '<td class="right">'.price($totalarray['totalttc']).'</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|||||||
@@ -122,8 +122,8 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print_liste_field_titre("LabelContrib", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("LabelContrib", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("TypeContrib", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("TypeContrib", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$sql = "SELECT c.id, c.libelle as lib,";
|
$sql = "SELECT c.id, c.libelle as lib,";
|
||||||
@@ -187,9 +187,9 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
if (empty($date)) $date=$obj->date_ech;
|
if (empty($date)) $date=$obj->date_ech;
|
||||||
print '<td>'.dol_print_date($date, 'day').'</td>';
|
print '<td>'.dol_print_date($date, 'day').'</td>';
|
||||||
// Expected to pay
|
// Expected to pay
|
||||||
print '<td align="right">'.price($obj->total).'</td>';
|
print '<td class="right">'.price($obj->total).'</td>';
|
||||||
// Paid
|
// Paid
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($obj->totalpaye) print price($obj->totalpaye);
|
if ($obj->totalpaye) print price($obj->totalpaye);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@@ -200,11 +200,11 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right" class="liste_total"></td>'; // A total here has no sense
|
print '<td class="liste_total right"></td>'; // A total here has no sense
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
print '<td align="right" class="liste_total">'.price($totalpaye)."</td>";
|
print '<td class="liste_total right">'.price($totalpaye)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -246,10 +246,10 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@@ -263,7 +263,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
|
|
||||||
print "<td>".$obj->label."</td>\n";
|
print "<td>".$obj->label."</td>\n";
|
||||||
|
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
|
|
||||||
// Ref payment
|
// Ref payment
|
||||||
$tva_static->id=$obj->rowid;
|
$tva_static->id=$obj->rowid;
|
||||||
@@ -271,16 +271,16 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
||||||
|
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n";
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right">'.price($total).'</td>';
|
print '<td class="right">'.price($total).'</td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="right">'.price($total)."</td>";
|
print '<td class="right">'.price($total)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@@ -347,10 +347,10 @@ while($j<$numlt)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@@ -364,7 +364,7 @@ while($j<$numlt)
|
|||||||
|
|
||||||
print "<td>".$obj->label."</td>\n";
|
print "<td>".$obj->label."</td>\n";
|
||||||
|
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
|
|
||||||
// Ref payment
|
// Ref payment
|
||||||
$tva_static->id=$obj->rowid;
|
$tva_static->id=$obj->rowid;
|
||||||
@@ -372,16 +372,16 @@ while($j<$numlt)
|
|||||||
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
||||||
|
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right">'.price($total)."</td>";
|
print '<td class="right">'.price($total)."</td>";
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="right">'.price($total)."</td>";
|
print '<td class="right">'.price($total)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@@ -428,10 +428,10 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "s.dateep", "", $param, 'width="140px"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "s.dateep", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "s.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "s.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@@ -446,7 +446,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
|||||||
|
|
||||||
print "<td>".$obj->label."</td>\n";
|
print "<td>".$obj->label."</td>\n";
|
||||||
|
|
||||||
print '<td align="right">'.($obj->salary?price($obj->salary):'')."</td>";
|
print '<td class="right">'.($obj->salary?price($obj->salary):'')."</td>";
|
||||||
|
|
||||||
// Ref payment
|
// Ref payment
|
||||||
$sal_static->id=$obj->rowid;
|
$sal_static->id=$obj->rowid;
|
||||||
@@ -454,16 +454,16 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
|||||||
print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n";
|
print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n";
|
||||||
|
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right"></td>'; // A total here has no sense
|
print '<td class="right"></td>'; // A total here has no sense
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="right">'.price($total)."</td>";
|
print '<td class="right">'.price($total)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@@ -257,10 +257,10 @@ while($i < 12)
|
|||||||
{
|
{
|
||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<td width="60" align="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
print '<td width="60" class="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||||
|
|
||||||
$sql = "SELECT fd.tva_tx AS vatrate,";
|
$sql = "SELECT fd.tva_tx AS vatrate,";
|
||||||
$sql .= " fd.product_type AS product_type,";
|
$sql .= " fd.product_type AS product_type,";
|
||||||
@@ -301,10 +301,10 @@ if ($resql) {
|
|||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||||
print '<td align="right" width="6%">' . price($obj->$monthj) . '</td>';
|
print '<td class="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||||
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
||||||
}
|
}
|
||||||
print '<td align="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
print '<td class="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||||
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -318,9 +318,9 @@ if ($resql) {
|
|||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||||
print '<td align="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
print '<td class="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
print '<td class="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
print $db->lasterror(); // Show last sql error
|
print $db->lasterror(); // Show last sql error
|
||||||
@@ -335,10 +335,10 @@ while($i < 12)
|
|||||||
{
|
{
|
||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<td width="60" align="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
print '<td width="60" class="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||||
|
|
||||||
$sql2 = "SELECT ffd.tva_tx AS vatrate,";
|
$sql2 = "SELECT ffd.tva_tx AS vatrate,";
|
||||||
$sql2 .= " ffd.product_type AS product_type,";
|
$sql2 .= " ffd.product_type AS product_type,";
|
||||||
@@ -380,10 +380,10 @@ if ($resql2) {
|
|||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||||
print '<td align="right" width="6%">' . price($obj->$monthj) . '</td>';
|
print '<td class="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||||
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
||||||
}
|
}
|
||||||
print '<td align="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
print '<td class="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||||
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -397,9 +397,9 @@ if ($resql2) {
|
|||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||||
print '<td align="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
print '<td class="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
print '<td class="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
print $db->lasterror(); // Show last sql error
|
print $db->lasterror(); // Show last sql error
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
$form->select_type_of_lines(isset($selected_type)?$selected_type:-1, 'search_type', 1, 1, 1);
|
$form->select_type_of_lines(isset($selected_type)?$selected_type:-1, 'search_type', 1, 1, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td colspan="5" align="right">';
|
print '<td colspan="5" class="right">';
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ print_liste_field_titre(
|
|||||||
"qty",
|
"qty",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -347,7 +347,7 @@ print_liste_field_titre(
|
|||||||
"qty",
|
"qty",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -356,8 +356,8 @@ print_liste_field_titre(
|
|||||||
$_SERVER["PHP_SELF"],
|
$_SERVER["PHP_SELF"],
|
||||||
"amount",
|
"amount",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$classslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -367,7 +367,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -377,7 +377,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -400,15 +400,15 @@ print_liste_field_titre(
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Quantity
|
// Quantity
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
print $qty[$key];
|
print $qty[$key];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent;
|
// Percent;
|
||||||
print '<td align="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
print '<td class="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
||||||
|
|
||||||
// Amount w/o VAT
|
// Amount w/o VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
/*if ($key > 0) {
|
/*if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||||
} else {
|
} else {
|
||||||
@@ -419,7 +419,7 @@ print_liste_field_titre(
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount with VAT
|
// Amount with VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
/*if ($key > 0) {
|
/*if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||||
} else {
|
} else {
|
||||||
@@ -430,7 +430,7 @@ print_liste_field_titre(
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent;
|
// Percent;
|
||||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||||
|
|
||||||
// TODO: statistics?
|
// TODO: statistics?
|
||||||
|
|
||||||
@@ -441,11 +441,11 @@ print_liste_field_titre(
|
|||||||
// Total
|
// Total
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td>'.$langs->trans("Total").'</td>';
|
print '<td>'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right">'.$qtytotal.'</td>';
|
print '<td class="right">'.$qtytotal.'</td>';
|
||||||
print '<td align="right">100%</td>';
|
print '<td class="right">100%</td>';
|
||||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||||
print '<td align="right">'.price($catotal).'</td>';
|
print '<td class="right">'.price($catotal).'</td>';
|
||||||
print '<td align="right">100%</td>';
|
print '<td class="right">100%</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
"amount_ht",
|
"amount_ht",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -323,7 +323,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -332,7 +332,7 @@ print_liste_field_titre(
|
|||||||
$_SERVER["PHP_SELF"], "amount_ttc",
|
$_SERVER["PHP_SELF"], "amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -391,7 +391,7 @@ if (count($amount)) {
|
|||||||
print "<td>".$linkname."</td>\n";
|
print "<td>".$linkname."</td>\n";
|
||||||
|
|
||||||
// Amount w/o VAT
|
// Amount w/o VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($modecompta != 'CREANCES-DETTES')
|
if ($modecompta != 'CREANCES-DETTES')
|
||||||
{
|
{
|
||||||
if ($key > 0) {
|
if ($key > 0) {
|
||||||
@@ -410,7 +410,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount with VAT
|
// Amount with VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
if ($key > 0) {
|
if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
|
||||||
@@ -428,7 +428,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent
|
// Percent
|
||||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||||
|
|
||||||
// Other stats
|
// Other stats
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@@ -452,9 +452,9 @@ if (count($amount)) {
|
|||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
print '<td colspan="1"></td>';
|
print '<td colspan="1"></td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price($catotal).'</td>';
|
print '<td class="right">'.price($catotal).'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@@ -378,22 +378,22 @@ if ($subcat) {
|
|||||||
print ' checked';
|
print ' checked';
|
||||||
}
|
}
|
||||||
print'></td>';
|
print'></td>';
|
||||||
print '<td colspan="7" align="right">';
|
print '<td colspan="7" class="right">';
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
|
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
|
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
|
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print $form->select_country($search_country, 'search_country');
|
print $form->select_country($search_country, 'search_country');
|
||||||
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
|
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -448,7 +448,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
"amount_ht",
|
"amount_ht",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -461,7 +461,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -471,7 +471,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -567,7 +567,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount w/o VAT
|
// Amount w/o VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
if ($key > 0) {
|
if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
||||||
@@ -585,7 +585,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount with VAT
|
// Amount with VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
if ($key > 0) {
|
if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
||||||
@@ -604,7 +604,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent;
|
// Percent;
|
||||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||||
|
|
||||||
// Other stats
|
// Other stats
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@@ -631,9 +631,9 @@ if (count($amount)) {
|
|||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
print '<td colspan="1"></td>';
|
print '<td colspan="1"></td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price($catotal).'</td>';
|
print '<td class="right">'.price($catotal).'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@@ -285,9 +285,9 @@ print '</tr>';
|
|||||||
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Month").'</td>';
|
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Month").'</td>';
|
||||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||||
{
|
{
|
||||||
if ($modecompta == 'CREANCES-DETTES') print '<td class="liste_titre" align="right">'.$langs->trans("AmountHT").'</td>';
|
if ($modecompta == 'CREANCES-DETTES') print '<td class="liste_titre right">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td class="liste_titre" align="right">'.$langs->trans("AmountTTC").'</td>';
|
print '<td class="liste_titre right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
print '<td class="liste_titre" align="right" class="borderrightlight">'.$langs->trans("Delta").'</td>';
|
print '<td class="liste_titre right borderrightlight">'.$langs->trans("Delta").'</td>';
|
||||||
if ($annee != $year_end) print '<td class="liste_titre" width="15"> </td>';
|
if ($annee != $year_end) print '<td class="liste_titre" width="15"> </td>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@@ -322,7 +322,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
{
|
{
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
// Valeur CA du mois w/o VAT
|
// Valeur CA du mois w/o VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($cum_ht[$case])
|
if ($cum_ht[$case])
|
||||||
{
|
{
|
||||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||||
@@ -337,7 +337,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Valeur CA du mois
|
// Valeur CA du mois
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($cum[$case])
|
if ($cum[$case])
|
||||||
{
|
{
|
||||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||||
@@ -359,29 +359,29 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
{
|
{
|
||||||
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev], 4)*100);
|
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev], 4)*100);
|
||||||
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
||||||
print '<td align="right" class="borderrightlight">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
print '<td class="borderrightlight right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||||
}
|
}
|
||||||
if ($cum[$caseprev] && ! $cum[$case])
|
if ($cum[$caseprev] && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">-100%</td>';
|
print '<td class="borderrightlight right">-100%</td>';
|
||||||
}
|
}
|
||||||
if (! $cum[$caseprev] && $cum[$case])
|
if (! $cum[$caseprev] && $cum[$case])
|
||||||
{
|
{
|
||||||
//print '<td align="right">+Inf%</td>';
|
//print '<td class="right">+Inf%</td>';
|
||||||
print '<td align="right" class="borderrightlight">-</td>';
|
print '<td class="borderrightlight right">-</td>';
|
||||||
}
|
}
|
||||||
if (isset($cum[$caseprev]) && ! $cum[$caseprev] && ! $cum[$case])
|
if (isset($cum[$caseprev]) && ! $cum[$caseprev] && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">+0%</td>';
|
print '<td class="borderrightlight right">+0%</td>';
|
||||||
}
|
}
|
||||||
if (! isset($cum[$caseprev]) && ! $cum[$case])
|
if (! isset($cum[$caseprev]) && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">-</td>';
|
print '<td class="borderrightlight right">-</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">';
|
print '<td class="borderrightlight right">';
|
||||||
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
||||||
else { print ' '; }
|
else { print ' '; }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -410,7 +410,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
$caseprev = dol_print_date(dol_mktime(1,1,1,$mois,1,$annee-1),"%Y-%m");
|
$caseprev = dol_print_date(dol_mktime(1,1,1,$mois,1,$annee-1),"%Y-%m");
|
||||||
|
|
||||||
// Valeur CA du mois
|
// Valeur CA du mois
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($cum[$case])
|
if ($cum[$case])
|
||||||
{
|
{
|
||||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||||
@@ -429,25 +429,25 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
{
|
{
|
||||||
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100);
|
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100);
|
||||||
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
||||||
print '<td align="right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
print '<td class="right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($cum[$caseprev] && ! $cum[$case])
|
if ($cum[$caseprev] && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right">-100%</td>';
|
print '<td class="right">-100%</td>';
|
||||||
}
|
}
|
||||||
if (! $cum[$caseprev] && $cum[$case])
|
if (! $cum[$caseprev] && $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right">+Inf%</td>';
|
print '<td class="right">+Inf%</td>';
|
||||||
}
|
}
|
||||||
if (! $cum[$caseprev] && ! $cum[$case])
|
if (! $cum[$caseprev] && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right">+0%</td>';
|
print '<td class="right">+0%</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
||||||
else { print ' '; }
|
else { print ' '; }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -469,7 +469,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
|||||||
// Montant total HT
|
// Montant total HT
|
||||||
if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
||||||
{
|
{
|
||||||
print '<td align="right" class="nowrap">'.($total_ht[$annee]?price($total_ht[$annee]):"0")."</td>";
|
print '<td class="nowrap right">'.($total_ht[$annee]?price($total_ht[$annee]):"0")."</td>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -480,7 +480,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
|||||||
// Montant total
|
// Montant total
|
||||||
if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
||||||
{
|
{
|
||||||
print '<td align="right" class="nowrap">'.($total[$annee]?price($total[$annee]):"0")."</td>";
|
print '<td class="nowrap right">'.($total[$annee]?price($total[$annee]):"0")."</td>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -492,24 +492,24 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
|||||||
{
|
{
|
||||||
if ($total[$annee-1] && $total[$annee]) {
|
if ($total[$annee-1] && $total[$annee]) {
|
||||||
$percent=(round(($total[$annee]-$total[$annee-1])/$total[$annee-1], 4)*100);
|
$percent=(round(($total[$annee]-$total[$annee-1])/$total[$annee-1], 4)*100);
|
||||||
print '<td align="right" class="nowrap borderrightlight">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
print '<td class="nowrap borderrightlight right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||||
}
|
}
|
||||||
if ($total[$annee-1] && ! $total[$annee])
|
if ($total[$annee-1] && ! $total[$annee])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">-100%</td>';
|
print '<td class="borderrightlight right">-100%</td>';
|
||||||
}
|
}
|
||||||
if (! $total[$annee-1] && $total[$annee])
|
if (! $total[$annee-1] && $total[$annee])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">+'.$langs->trans('Inf').'%</td>';
|
print '<td class="borderrightlight right">+'.$langs->trans('Inf').'%</td>';
|
||||||
}
|
}
|
||||||
if (! $total[$annee-1] && ! $total[$annee])
|
if (! $total[$annee-1] && ! $total[$annee])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">+0%</td>';
|
print '<td class="borderrightlight right">+0%</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">';
|
print '<td class="borderrightlight right">';
|
||||||
if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; }
|
if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; }
|
||||||
else { print ' '; }
|
else { print ' '; }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -567,7 +567,7 @@ print '</div>';
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Facture a encaisser : </i></td><td align=\"right\"><i>".price($total_ttc_Rac)."</i></td><td colspan=\"5\"><-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es</td></tr>";
|
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Facture a encaisser : </i></td><td class=\"right\"><i>".price($total_ttc_Rac)."</i></td><td colspan=\"5\"><-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es</td></tr>";
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
@@ -616,7 +616,7 @@ print '</div>';
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Signe et non facture:</i></td><td align=\"right\"><i>".price($total_pr)."</i></td><td colspan=\"5\"><-- bug ici, ca devrait exclure le deja facture</td></tr>";
|
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Signe et non facture:</i></td><td class=\"right\"><i>".price($total_pr)."</i></td><td colspan=\"5\"><-- bug ici, ca devrait exclure le deja facture</td></tr>";
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
@@ -624,7 +624,7 @@ print '</div>';
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Total CA previsionnel : </i></td><td align=\"right\"><i>".price($total_CA)."</i></td><td colspan=\"3\"><-- bug ici car bug sur les 2 precedents</td></tr>";
|
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Total CA previsionnel : </i></td><td class=\"right\"><i>".price($total_CA)."</i></td><td colspan=\"3\"><-- bug ici car bug sur les 2 precedents</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
@@ -351,15 +351,15 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
|
print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
|
||||||
if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">'.$langs->trans("DatePayment").'</td>';
|
if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">'.$langs->trans("DatePayment").'</td>';
|
||||||
else print '<td></td>';
|
else print '<td></td>';
|
||||||
print '<td align="right">'.$namerate.'</td>';
|
print '<td class="right">'.$namerate.'</td>';
|
||||||
print '<td class="left">'.$productcust.'</td>';
|
print '<td class="left">'.$productcust.'</td>';
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.$amountcust.'</td>';
|
print '<td class="right">'.$amountcust.'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
||||||
print '<td align="right">'.$vatcust.'</td>';
|
print '<td class="right">'.$vatcust.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$action = "tvadetail";
|
$action = "tvadetail";
|
||||||
@@ -414,7 +414,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||||
|
|
||||||
// Invoice date
|
// Invoice date
|
||||||
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
||||||
@@ -424,7 +424,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
else print '<td></td>';
|
else print '<td></td>';
|
||||||
|
|
||||||
// Rate
|
// Rate
|
||||||
print '<td align="right">' . $fields['drate'] . '</td>';
|
print '<td class="right">' . $fields['drate'] . '</td>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
@@ -464,7 +464,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total HT
|
// Total HT
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
print price($fields['totalht']);
|
print price($fields['totalht']);
|
||||||
if (price2num($fields['ftotal_ttc']))
|
if (price2num($fields['ftotal_ttc']))
|
||||||
{
|
{
|
||||||
@@ -479,7 +479,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$ratiopaymentinvoice=1;
|
$ratiopaymentinvoice=1;
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
||||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||||
{
|
{
|
||||||
@@ -503,13 +503,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Total collected
|
// Total collected
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_ht, 'MT'), 1);
|
print price(price2num($temp_ht, 'MT'), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_vat, 'MT'), 1);
|
print price(price2num($temp_vat, 'MT'), 1);
|
||||||
//print price($fields['vat']);
|
//print price($fields['vat']);
|
||||||
@@ -524,13 +524,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total customers for this vat rate
|
// Total customers for this vat rate
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -538,13 +538,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
{
|
{
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -560,11 +560,11 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<td class="left">'.$namesup.'</td>';
|
print '<td class="left">'.$namesup.'</td>';
|
||||||
print '<td class="left">'.$productsup.'</td>';
|
print '<td class="left">'.$productsup.'</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td align="right">'.$amountsup.'</td>';
|
print '<td class="right">'.$amountsup.'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
|
||||||
print '<td align="right">'.$vatsup.'</td>';
|
print '<td class="right">'.$vatsup.'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
foreach (array_keys($x_paye) as $thirdparty_id)
|
foreach (array_keys($x_paye) as $thirdparty_id)
|
||||||
@@ -607,7 +607,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||||
|
|
||||||
// Invoice date
|
// Invoice date
|
||||||
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
||||||
@@ -657,7 +657,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total HT
|
// Total HT
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
print price($fields['totalht']);
|
print price($fields['totalht']);
|
||||||
if (price2num($fields['ftotal_ttc']))
|
if (price2num($fields['ftotal_ttc']))
|
||||||
{
|
{
|
||||||
@@ -672,7 +672,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$ratiopaymentinvoice=1;
|
$ratiopaymentinvoice=1;
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||||
{
|
{
|
||||||
$paymentfourn_static->id=$fields['payment_id'];
|
$paymentfourn_static->id=$fields['payment_id'];
|
||||||
@@ -698,13 +698,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VAT paid
|
// VAT paid
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_ht, 'MT'), 1);
|
print price(price2num($temp_ht, 'MT'), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_vat, 'MT'), 1);
|
print price(price2num($temp_vat, 'MT'), 1);
|
||||||
//print price($fields['vat']);
|
//print price($fields['vat']);
|
||||||
@@ -719,26 +719,26 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total suppliers for this vat rate
|
// Total suppliers for this vat rate
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,7 +750,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$diff = $x_coll_sum - $x_paye_sum;
|
$diff = $x_coll_sum - $x_paye_sum;
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
||||||
print '<td class="liste_total nowrap" align="right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
|
print '<td class="liste_total nowrap right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ function dol_include_once($relpath, $classname = '')
|
|||||||
$fullpath = dol_buildpath($relpath);
|
$fullpath = dol_buildpath($relpath);
|
||||||
|
|
||||||
if (!file_exists($fullpath)) {
|
if (!file_exists($fullpath)) {
|
||||||
dol_syslog('functions::dol_include_once Tried to load unexisting file: '.$relpath, LOG_ERR);
|
dol_syslog('functions::dol_include_once Tried to load unexisting file: '.$relpath, LOG_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user