replace html by html5 in fourn
This commit is contained in:
parent
4ecc1dac56
commit
d96cc53f97
@ -419,11 +419,11 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
//if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture'];
|
||||
//elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement'];
|
||||
print '<tr class="oddeven '.$html_class.'">';
|
||||
print "<td align=\"center\">";
|
||||
print "<td class=\"center\">";
|
||||
print dol_print_date($data['date'], 'day');
|
||||
print "</td>\n";
|
||||
print '<td aling="left">'.$langs->trans($data['item']).'</td>';
|
||||
print '<td aling="left">'.$data['ref'].'</td>';
|
||||
print '<td class="left">'.$langs->trans($data['item']).'</td>';
|
||||
print '<td class="left">'.$data['ref'].'</td>';
|
||||
|
||||
// File link
|
||||
print '<td><a href='.DOL_URL_ROOT.'/'.$data['link'].">".$data['name']."</a></td>\n";
|
||||
|
||||
@ -252,22 +252,22 @@ if ($id > 0)
|
||||
|
||||
print '<tr class="oddeven '.$html_class.'">';
|
||||
|
||||
print "<td align=\"center\">";
|
||||
print "<td class=\"center\">";
|
||||
if (!empty($data['fk_facture'])) print dol_print_date($data['date'], 'day');
|
||||
elseif (!empty($data['fk_paiement'])) print dol_print_date($data['date'], 'dayhour');
|
||||
print "</td>\n";
|
||||
|
||||
print '<td>'.$data['link']."</td>\n";
|
||||
|
||||
print '<td aling="left">'.$data['status'].'</td>';
|
||||
print '<td class="left">'.$data['status'].'</td>';
|
||||
|
||||
print '<td class="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n";
|
||||
|
||||
|
||||
$totalDebit += ($data['amount'] > 0) ? abs($data['amount']) : 0;
|
||||
|
||||
|
||||
print '<td class="right">'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."</td>\n";
|
||||
$totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']);
|
||||
|
||||
|
||||
// Balance
|
||||
print '<td class="right">'.price($data['balance'])."</td>\n";
|
||||
|
||||
|
||||
@ -6651,7 +6651,7 @@ class Form
|
||||
$objp = $this->db->fetch_object($resqllist);
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td aling="left">';
|
||||
print '<td class="left">';
|
||||
print '<input type="radio" name="idtolinkto" value=' . $objp->rowid . '>';
|
||||
print '</td>';
|
||||
print '<td class="center">' . $objp->ref . '</td>';
|
||||
|
||||
@ -232,7 +232,7 @@ if ($object->id > 0)
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('PaymentConditions');
|
||||
print '<td>';
|
||||
if (($action != 'editconditions') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&socid='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
|
||||
if (($action != 'editconditions') && $user->rights->societe->creer) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&socid='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editconditions')
|
||||
@ -251,7 +251,7 @@ if ($object->id > 0)
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '<td>';
|
||||
if (($action != 'editmode') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&socid='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>';
|
||||
if (($action != 'editmode') && $user->rights->societe->creer) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&socid='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editmode')
|
||||
@ -269,7 +269,7 @@ if ($object->id > 0)
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans("CustomerRelativeDiscountShort");
|
||||
print '<td><td align="right">';
|
||||
print '<td><td class="right">';
|
||||
if ($user->rights->societe->creer && !$user->societe_id > 0)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
@ -283,7 +283,7 @@ if ($object->id > 0)
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr><td class="nowrap">';
|
||||
print $langs->trans("CustomerAbsoluteDiscountShort");
|
||||
print '<td><td align="right">';
|
||||
print '<td><td class="right">';
|
||||
if ($user->rights->societe->creer && !$user->societe_id > 0)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$object->id).'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
@ -442,7 +442,7 @@ if ($object->id > 0)
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("Summary").'</td>';
|
||||
print '<td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/recap-fourn.php?socid='.$object->id.'">'.$langs->trans("ShowSupplierPreview").'</a></td></tr></table></td>';
|
||||
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/recap-fourn.php?socid='.$object->id.'">'.$langs->trans("ShowSupplierPreview").'</a></td></tr></table></td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
@ -471,7 +471,7 @@ if ($object->id > 0)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre'.(($num == 0) ? ' nobottom':'').'">';
|
||||
print '<td colspan="3">'.$langs->trans("ProductsAndServices").'</td><td align="right">';
|
||||
print '<td colspan="3">'.$langs->trans("ProductsAndServices").'</td><td class="right">';
|
||||
print '<a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/product/list.php?fourn_id='.$object->id.'">'.$langs->trans("AllProductReferencesOfSupplier").' <span class="badge">'.$object->nbOfProductRefs().'</span>';
|
||||
print '</a></td></tr>';
|
||||
|
||||
@ -498,8 +498,8 @@ if ($object->id > 0)
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
print dol_trunc(dol_htmlentities($objp->label), 30);
|
||||
print '</td>';
|
||||
//print '<td align="right" class="nowrap">'.dol_print_date($objp->tms, 'day').'</td>';
|
||||
print '<td align="right">';
|
||||
//print '<td class="right" class="nowrap">'.dol_print_date($objp->tms, 'day').'</td>';
|
||||
print '<td class="right">';
|
||||
//print (isset($objp->unitprice) ? price($objp->unitprice) : '');
|
||||
if (isset($objp->price))
|
||||
{
|
||||
@ -546,8 +546,8 @@ if ($object->id > 0)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">';
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastSupplierProposals", ($num<$MAXLIST?"":$MAXLIST)).'</td>';
|
||||
print '<td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->id.'">'.$langs->trans("AllPriceRequests").' <span class="badge">'.$num.'</span></td>';
|
||||
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/supplier_proposal/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->id.'">'.$langs->trans("AllPriceRequests").' <span class="badge">'.$num.'</span></td>';
|
||||
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/supplier_proposal/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -565,7 +565,7 @@ if ($object->id > 0)
|
||||
$proposalstatic->total_ttc = $obj->total_ttc;
|
||||
print $proposalstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<td align="center" width="80">';
|
||||
print '<td class="center" width="80">';
|
||||
if ($obj->dc)
|
||||
{
|
||||
print dol_print_date($db->jdate($obj->dc), 'day');
|
||||
@ -575,7 +575,7 @@ if ($object->id > 0)
|
||||
print "-";
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="right" class="nowrap">'.$proposalstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '<td class="right" class="nowrap">'.$proposalstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
@ -649,8 +649,8 @@ if ($object->id > 0)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans("LastSupplierOrders", ($num<$MAXLIST?"":$MAXLIST)).'</td>';
|
||||
print '<td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->id.'">'.$langs->trans("AllOrders").' <span class="badge">'.$num.'</span></td>';
|
||||
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->id.'">'.$langs->trans("AllOrders").' <span class="badge">'.$num.'</span></td>';
|
||||
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -668,7 +668,7 @@ if ($object->id > 0)
|
||||
$orderstatic->total_ttc = $obj->total_ttc;
|
||||
print $orderstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<td align="center" width="80">';
|
||||
print '<td class="center" width="80">';
|
||||
if ($obj->dc)
|
||||
{
|
||||
print dol_print_date($db->jdate($obj->dc), 'day');
|
||||
@ -678,7 +678,7 @@ if ($object->id > 0)
|
||||
print "-";
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="right" class="nowrap">'.$orderstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '<td class="right" class="nowrap">'.$orderstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
@ -721,8 +721,8 @@ if ($object->id > 0)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('LastSuppliersBills', ($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->id.'">'.$langs->trans('AllBills').' <span class="badge">'.$num.'</span></td>';
|
||||
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('LastSuppliersBills', ($num<=$MAXLIST?"":$MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->id.'">'.$langs->trans('AllBills').' <span class="badge">'.$num.'</span></td>';
|
||||
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -745,9 +745,9 @@ if ($object->id > 0)
|
||||
print $obj->ref_supplier?' - '.$obj->ref_supplier:'';
|
||||
print ($obj->libelle?' - ':'').dol_trunc($obj->libelle, 14);
|
||||
print '</td>';
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->df), 'day').'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($obj->amount).'</td>';
|
||||
print '<td align="right" class="nowrap">';
|
||||
print '<td class="center nowrap">'.dol_print_date($db->jdate($obj->df), 'day').'</td>';
|
||||
print '<td class="right nowrap">'.price($obj->amount).'</td>';
|
||||
print '<td class="right nowrap">';
|
||||
print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $obj->am);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -523,12 +523,12 @@ if ($id > 0 || ! empty($ref)) {
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
}
|
||||
print '<td align="right">' . $langs->trans("SupplierRef") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("QtyOrdered") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("QtyDispatchedShort") . '</td>';
|
||||
print '<td align="right">' . $langs->trans("QtyToDispatchShort") . '</td>';
|
||||
print '<td class="right">' . $langs->trans("SupplierRef") . '</td>';
|
||||
print '<td class="right">' . $langs->trans("QtyOrdered") . '</td>';
|
||||
print '<td class="right">' . $langs->trans("QtyDispatchedShort") . '</td>';
|
||||
print '<td class="right">' . $langs->trans("QtyToDispatchShort") . '</td>';
|
||||
print '<td width="32"></td>';
|
||||
print '<td align="right">' . $langs->trans("Warehouse") . '</td>';
|
||||
print '<td class="right">' . $langs->trans("Warehouse") . '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -595,17 +595,17 @@ if ($id > 0 || ! empty($ref)) {
|
||||
$up_ht_disc = price2num($up_ht_disc * (100 - $objp->remise_percent) / 100, 'MU');
|
||||
|
||||
// Supplier ref
|
||||
print '<td align="right">'.$objp->sref.'</td>';
|
||||
print '<td class="right">'.$objp->sref.'</td>';
|
||||
|
||||
// Qty ordered
|
||||
print '<td align="right">' . $objp->qty . '</td>';
|
||||
print '<td class="right">' . $objp->qty . '</td>';
|
||||
|
||||
// Already dispatched
|
||||
print '<td align="right">' . $products_dispatched[$objp->rowid] . '</td>';
|
||||
print '<td class="right">' . $products_dispatched[$objp->rowid] . '</td>';
|
||||
|
||||
if (! empty($conf->productbatch->enabled) && $objp->tobatch == 1) {
|
||||
$type = 'batch';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print '</td>'; // Qty to dispatch
|
||||
print '<td>';
|
||||
//print img_picto($langs->trans('AddDispatchBatchLine'), 'split.png', 'onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"');
|
||||
@ -645,7 +645,7 @@ if ($id > 0 || ! empty($ref)) {
|
||||
} else {
|
||||
|
||||
$type = 'dispatch';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print '</td>'; // Qty to dispatch
|
||||
print '<td>';
|
||||
//print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"');
|
||||
@ -672,7 +672,7 @@ if ($id > 0 || ! empty($ref)) {
|
||||
}
|
||||
|
||||
// Qty to dispatch
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print '<input id="qty' . $suffix . '" name="qty' . $suffix . '" type="text" class="width50 right" value="' . (GETPOST('qty' . $suffix) != '' ? GETPOST('qty' . $suffix) : $remaintodispatch) . '">';
|
||||
print '</td>';
|
||||
|
||||
@ -691,7 +691,7 @@ if ($id > 0 || ! empty($ref)) {
|
||||
print '</td>';
|
||||
|
||||
// Warehouse
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if (count($listwarehouses) > 1) {
|
||||
print $formproduct->selectWarehouses(GETPOST("entrepot" . $suffix)?GETPOST("entrepot" . $suffix):($objp->fk_default_warehouse?$objp->fk_default_warehouse:''), "entrepot" . $suffix, '', 1, 0, $objp->fk_product, '', 1, 0, null, 'csswarehouse'.$suffix);
|
||||
} elseif (count($listwarehouses) == 1) {
|
||||
@ -796,12 +796,12 @@ if ($id > 0 || ! empty($ref)) {
|
||||
print '<td class="dispatch_dluo_title">' . $langs->trans("EatByDate") . '</td>';
|
||||
print '<td class="dispatch_dlc_title">' . $langs->trans("SellByDate") . '</td>';
|
||||
}
|
||||
print '<td align="right">' . $langs->trans("QtyDispatched") . '</td>';
|
||||
print '<td class="right">' . $langs->trans("QtyDispatched") . '</td>';
|
||||
print '<td></td>';
|
||||
print '<td>' . $langs->trans("Warehouse") . '</td>';
|
||||
print '<td>' . $langs->trans("Comment") . '</td>';
|
||||
if (! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS) || !empty($conf->reception->enabled))
|
||||
print '<td align="center" colspan="2">' . $langs->trans("Status") . '</td>';
|
||||
print '<td class="center" colspan="2">' . $langs->trans("Status") . '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -836,7 +836,7 @@ if ($id > 0 || ! empty($ref)) {
|
||||
}
|
||||
|
||||
// Qty
|
||||
print '<td align="right">' . $objp->qty . '</td>';
|
||||
print '<td class="right">' . $objp->qty . '</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
// Warehouse
|
||||
@ -851,14 +851,14 @@ if ($id > 0 || ! empty($ref)) {
|
||||
|
||||
// Status
|
||||
if (! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS) && empty($reception->rowid)) {
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
$supplierorderdispatch->status = (empty($objp->status) ? 0 : $objp->status);
|
||||
// print $supplierorderdispatch->status;
|
||||
print $supplierorderdispatch->getLibStatut(5);
|
||||
print '</td>';
|
||||
|
||||
// Add button to check/uncheck disaptching
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))
|
||||
{
|
||||
if (empty($objp->status)) {
|
||||
@ -887,13 +887,13 @@ if ($id > 0 || ! empty($ref)) {
|
||||
}
|
||||
print '</td>';
|
||||
}elseif(!empty($conf->reception->enabled)){
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if(!empty($reception->id)){
|
||||
print $reception->getLibStatut(5);
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '</td>';
|
||||
|
||||
|
||||
|
||||
@ -119,13 +119,13 @@ if ($resql)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$commandestatic->LibStatut($statut, 0).'</td>';
|
||||
print '<td align="right"><a href="list.php?statut='.$statut.'">'.(isset($vals[$statut])?$vals[$statut]:0).'</a></td>';
|
||||
print '<td class="right"><a href="list.php?statut='.$statut.'">'.(isset($vals[$statut])?$vals[$statut]:0).'</a></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr class="impair"><td align="center" colspan="2">';
|
||||
print '<tr class="impair"><td class="center" colspan="2">';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
$dolgraph = new DolGraph();
|
||||
@ -140,8 +140,8 @@ if ($resql)
|
||||
print '</td></tr>';
|
||||
}
|
||||
//if ($totalinprocess != $total)
|
||||
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.$total.'</td></tr>';
|
||||
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')</td><td class="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'.$total.'</td></tr>';
|
||||
|
||||
print "</table><br>";
|
||||
}
|
||||
@ -176,7 +176,7 @@ if ($resql)
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><th>'.$langs->trans("Status").'</th>';
|
||||
print '<th align="right">'.$langs->trans("Nb").'</th>';
|
||||
print '<th class="right">'.$langs->trans("Nb").'</th>';
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $num)
|
||||
@ -185,7 +185,7 @@ if ($resql)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$commandestatic->LibStatut($row[1]).'</td>';
|
||||
print '<td align="right"><a href="list.php?statut='.$row[1].'">'.$row[0].' '.$commandestatic->LibStatut($row[1], 3).'</a></td>';
|
||||
print '<td class="right"><a href="list.php?statut='.$row[1].'">'.$row[0].' '.$commandestatic->LibStatut($row[1], 3).'</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
@ -341,7 +341,7 @@ if ($resql)
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
@ -352,7 +352,7 @@ if ($resql)
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"), "company").' '.$obj->name.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
@ -408,7 +408,7 @@ print '<td width="16" class="nobordernopadding nowrap">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
@ -419,7 +419,7 @@ print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).'</a></td>';
|
||||
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -791,21 +791,21 @@ if ($resql)
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
// Company type
|
||||
if (! empty($arrayfields['typent.code']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone center">';
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
print '</td>';
|
||||
}
|
||||
// Date order
|
||||
if (! empty($arrayfields['cf.date_commande']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
print '<td class="liste_titre nowraponall center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_orderday" value="'.$search_orderday.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">';
|
||||
$formother->select_year($search_orderyear?$search_orderyear:-1, 'search_orderyear', 1, 20, 5);
|
||||
@ -814,7 +814,7 @@ if ($resql)
|
||||
// Date delivery
|
||||
if (! empty($arrayfields['cf.date_delivery']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
print '<td class="liste_titre nowraponall center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">';
|
||||
$formother->select_year($search_deliveryyear?$search_deliveryyear:-1, 'search_deliveryyear', 1, 20, 5);
|
||||
@ -823,21 +823,21 @@ if ($resql)
|
||||
if (! empty($arrayfields['cf.total_ht']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_total_ht" value="'.$search_total_ht.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['cf.total_vat']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_total_vat" value="'.$search_total_vat.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['cf.total_ttc']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_total_ttc" value="'.$search_total_ttc.'">';
|
||||
print '</td>';
|
||||
}
|
||||
@ -863,19 +863,19 @@ if ($resql)
|
||||
// Status
|
||||
if (! empty($arrayfields['cf.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$formorder->selectSupplierOrderStatus((strstr($search_status, ',')?-1:$search_status), 1, 'search_status');
|
||||
print '</td>';
|
||||
}
|
||||
// Status billed
|
||||
if (! empty($arrayfields['cf.billed']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->selectyesno('search_billed', $search_billed, 1, 0, 1);
|
||||
print '</td>';
|
||||
}
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="middle">';
|
||||
print '<td class="liste_titre middle">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -891,25 +891,25 @@ if ($resql)
|
||||
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['cf.fk_author']['checked'])) print_liste_field_titre($arrayfields['cf.fk_author']['label'], $_SERVER["PHP_SELF"], "cf.fk_author", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.date_commande']['checked'])) print_liste_field_titre($arrayfields['cf.date_commande']['label'], $_SERVER["PHP_SELF"], "cf.date_commande", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.date_delivery']['checked'])) print_liste_field_titre($arrayfields['cf.date_delivery']['label'], $_SERVER["PHP_SELF"], 'cf.date_livraison', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.total_ht']['checked'])) print_liste_field_titre($arrayfields['cf.total_ht']['label'], $_SERVER["PHP_SELF"], "cf.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.total_vat']['checked'])) print_liste_field_titre($arrayfields['cf.total_vat']['label'], $_SERVER["PHP_SELF"], "cf.tva", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.total_ttc']['checked'])) print_liste_field_titre($arrayfields['cf.total_ttc']['label'], $_SERVER["PHP_SELF"], "cf.total_ttc", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.date_commande']['checked'])) print_liste_field_titre($arrayfields['cf.date_commande']['label'], $_SERVER["PHP_SELF"], "cf.date_commande", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['cf.date_delivery']['checked'])) print_liste_field_titre($arrayfields['cf.date_delivery']['label'], $_SERVER["PHP_SELF"], 'cf.date_livraison', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['cf.total_ht']['checked'])) print_liste_field_titre($arrayfields['cf.total_ht']['label'], $_SERVER["PHP_SELF"], "cf.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['cf.total_vat']['checked'])) print_liste_field_titre($arrayfields['cf.total_vat']['label'], $_SERVER["PHP_SELF"], "cf.tva", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['cf.total_ttc']['checked'])) print_liste_field_titre($arrayfields['cf.total_ttc']['label'], $_SERVER["PHP_SELF"], "cf.total_ttc", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['cf.datec']['checked'])) print_liste_field_titre($arrayfields['cf.datec']['label'], $_SERVER["PHP_SELF"], "cf.date_creation", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.tms']['checked'])) print_liste_field_titre($arrayfields['cf.tms']['label'], $_SERVER["PHP_SELF"], "cf.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.fk_statut']['checked'])) print_liste_field_titre($arrayfields['cf.fk_statut']['label'], $_SERVER["PHP_SELF"], "cf.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cf.billed']['checked'])) print_liste_field_titre($arrayfields['cf.billed']['label'], $_SERVER["PHP_SELF"], 'cf.billed', '', $param, 'align="center"', $sortfield, $sortorder, '');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
if (! empty($arrayfields['cf.datec']['checked'])) print_liste_field_titre($arrayfields['cf.datec']['label'], $_SERVER["PHP_SELF"], "cf.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['cf.tms']['checked'])) print_liste_field_titre($arrayfields['cf.tms']['label'], $_SERVER["PHP_SELF"], "cf.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['cf.fk_statut']['checked'])) print_liste_field_titre($arrayfields['cf.fk_statut']['label'], $_SERVER["PHP_SELF"], "cf.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['cf.billed']['checked'])) print_liste_field_titre($arrayfields['cf.billed']['label'], $_SERVER["PHP_SELF"], 'cf.billed', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -952,7 +952,7 @@ if ($resql)
|
||||
//print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
//print '</td>';
|
||||
// Other picto tool
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->fournisseur->commande->dir_output.'/' . dol_sanitizeFileName($obj->ref);
|
||||
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
@ -1027,7 +1027,7 @@ if ($resql)
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$tmparray=getCountry($obj->fk_pays, 'all');
|
||||
print $tmparray['label'];
|
||||
print '</td>';
|
||||
@ -1036,7 +1036,7 @@ if ($resql)
|
||||
// Type ent
|
||||
if (! empty($arrayfields['typent.code']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
|
||||
print $typenArray[$obj->typent_code];
|
||||
print '</td>';
|
||||
@ -1046,7 +1046,7 @@ if ($resql)
|
||||
// Order date
|
||||
if (! empty($arrayfields['cf.date_commande']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($obj->date_commande) print dol_print_date($db->jdate($obj->date_commande), 'day');
|
||||
else print '';
|
||||
print '</td>';
|
||||
@ -1055,7 +1055,7 @@ if ($resql)
|
||||
// Plannned date of delivery
|
||||
if (! empty($arrayfields['cf.date_delivery']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->date_delivery), 'day');
|
||||
if ($objectstatic->hasDelay() && ! empty($objectstatic->date_delivery)) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning");
|
||||
@ -1066,7 +1066,7 @@ if ($resql)
|
||||
// Amount HT
|
||||
if (! empty($arrayfields['cf.total_ht']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_ht)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_ht)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalht'] += $obj->total_ht;
|
||||
@ -1074,7 +1074,7 @@ if ($resql)
|
||||
// Amount VAT
|
||||
if (! empty($arrayfields['cf.total_vat']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_tva)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_tva)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalvat'] += $obj->total_tva;
|
||||
@ -1082,7 +1082,7 @@ if ($resql)
|
||||
// Amount TTC
|
||||
if (! empty($arrayfields['cf.total_ttc']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_ttc)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_ttc)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalttc'] += $obj->total_ttc;
|
||||
@ -1097,7 +1097,7 @@ if ($resql)
|
||||
// Date creation
|
||||
if (! empty($arrayfields['cf.datec']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -1105,7 +1105,7 @@ if ($resql)
|
||||
// Date modification
|
||||
if (! empty($arrayfields['cf.tms']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -1113,18 +1113,18 @@ if ($resql)
|
||||
// Status
|
||||
if (! empty($arrayfields['cf.fk_statut']['checked']))
|
||||
{
|
||||
print '<td align="right" class="nowrap">'.$objectstatic->LibStatut($obj->fk_statut, 5, $obj->billed).'</td>';
|
||||
print '<td class="right nowrap">'.$objectstatic->LibStatut($obj->fk_statut, 5, $obj->billed).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Billed
|
||||
if (! empty($arrayfields['cf.billed']['checked']))
|
||||
{
|
||||
print '<td align="center">'.yn($obj->billed).'</td>';
|
||||
print '<td class="center">'.yn($obj->billed).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Action column
|
||||
print '<td class="nowrap" align="center">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
@ -1151,9 +1151,9 @@ if ($resql)
|
||||
if ($num < $limit) print '<td class="left">'.$langs->trans("Total").'</td>';
|
||||
else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
elseif ($totalarray['totalhtfield'] == $i) print '<td align="right">'.price($totalarray['totalht']).'</td>';
|
||||
elseif ($totalarray['totalvatfield'] == $i) print '<td align="right">'.price($totalarray['totalvat']).'</td>';
|
||||
elseif ($totalarray['totalttcfield'] == $i) print '<td align="right">'.price($totalarray['totalttc']).'</td>';
|
||||
elseif ($totalarray['totalhtfield'] == $i) print '<td class="right">'.price($totalarray['totalht']).'</td>';
|
||||
elseif ($totalarray['totalvatfield'] == $i) print '<td class="right">'.price($totalarray['totalvat']).'</td>';
|
||||
elseif ($totalarray['totalttcfield'] == $i) print '<td class="right">'.price($totalarray['totalttc']).'</td>';
|
||||
else print '<td></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
@ -500,10 +500,10 @@ if (($action != 'create' && $action != 'add') && !$error) {
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre('Ref', 'orderstoinvoice.php', 'c.ref', '', '&socid=' . $socid, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre('RefSupplier', 'orderstoinvoice.php', 'c.ref_supplier', '', '&socid=' . $socid, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre('OrderDate', 'orderstoinvoice.php', 'c.date_commande', '', '&socid=' . $socid, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('DeliveryDate', 'orderstoinvoice.php', 'c.date_livraison', '', '&socid=' . $socid, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('Status', '', '', '', '', 'align="right"');
|
||||
print_liste_field_titre('GenerateBill', '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre('OrderDate', 'orderstoinvoice.php', 'c.date_commande', '', '&socid=' . $socid, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre('DeliveryDate', 'orderstoinvoice.php', 'c.date_livraison', '', '&socid=' . $socid, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre('Status', '', '', '', '', '', '', '', 'right ');
|
||||
print_liste_field_titre('GenerateBill', '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
@ -513,27 +513,27 @@ if (($action != 'create' && $action != 'add') && !$error) {
|
||||
print '<input class="flat" size="10" type="text" name="sref" value="' . $sref . '">';
|
||||
print '</td>';
|
||||
// print '<td class="liste_titre">';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="10" name="sref_client" value="' . $sref_client . '">';
|
||||
print '</td>';
|
||||
|
||||
// DATE ORDER
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $period;
|
||||
print '</td>';
|
||||
|
||||
// DATE DELIVERY
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $periodely;
|
||||
print '</td>';
|
||||
|
||||
// SEARCH BUTTON
|
||||
print '<td align="right" class="liste_titre">';
|
||||
print '<td class="right liste_titre">';
|
||||
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>';
|
||||
|
||||
// ALL/NONE
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
if ($conf->use_javascript_ajax)
|
||||
print '<a href="#" id="checkall">' . $langs->trans("All") . '</a> / <a href="#" id="checknone">' . $langs->trans("None") . '</a>';
|
||||
print '</td>';
|
||||
@ -556,7 +556,7 @@ if (($action != 'create' && $action != 'add') && !$error) {
|
||||
print $generic_commande->getNomUrl(1, $objp->fk_statut);
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename = dol_sanitizeFileName($objp->ref);
|
||||
$filedir = $conf->fournisseur->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||
$urlsource = $_SERVER['PHP_SELF'] . '?id=' . $objp->rowid;
|
||||
@ -567,17 +567,17 @@ if (($action != 'create' && $action != 'add') && !$error) {
|
||||
print '<td>' . $objp->ref_supplier . '</td>';
|
||||
|
||||
// Order date
|
||||
print '<td align="center" nowrap>';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($objp->date_commande), 'day');
|
||||
print '</td>';
|
||||
|
||||
// Delivery date
|
||||
print '<td align="center" nowrap>';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($objp->date_livraison), 'day');
|
||||
print '</td>';
|
||||
|
||||
// Statut
|
||||
print '<td align="right" class="nowrap">' . $generic_commande->LibStatut($objp->fk_statut, 5) . '</td>';
|
||||
print '<td class="right nowrap">' . $generic_commande->LibStatut($objp->fk_statut, 5) . '</td>';
|
||||
|
||||
// Checkbox
|
||||
print '<td class="center">';
|
||||
|
||||
@ -49,14 +49,14 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<td><?php echo $langs->trans("SupplierOrder"); ?></td>
|
||||
<td><a href="<?php echo DOL_URL_ROOT.'/fourn/commande/card.php?id='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowOrder"), "order").' '.$objectlink->ref; ?></a></td>
|
||||
<td class="left"><?php echo $objectlink->ref_supplier; ?></td>
|
||||
<td align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
<td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||
<td class="right"><?php
|
||||
if ($user->rights->fournisseur->commande->lire) {
|
||||
$total = $total + $objectlink->total_ht;
|
||||
echo price($objectlink->total_ht);
|
||||
} ?></td>
|
||||
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -66,11 +66,11 @@ if (count($linkedObjectBlock) > 1)
|
||||
<tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':''); ?>">
|
||||
<td><?php echo $langs->trans("Total"); ?></td>
|
||||
<td></td>
|
||||
<td align="center"></td>
|
||||
<td align="center"></td>
|
||||
<td align="right"><?php echo price($total); ?></td>
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
<td class="center"></td>
|
||||
<td class="center"></td>
|
||||
<td class="right"><?php echo price($total); ?></td>
|
||||
<td class="right"></td>
|
||||
<td class="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -2502,7 +2502,7 @@ else
|
||||
print $langs->trans('PaymentConditions');
|
||||
print '<td>';
|
||||
if ($action != 'editconditions' && $user->rights->fournisseur->facture->creer) {
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
@ -2524,7 +2524,7 @@ else
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) {
|
||||
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 '</td><td colspan="2">';
|
||||
@ -2548,7 +2548,7 @@ else
|
||||
print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon))
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editmulticurrencycode') {
|
||||
@ -2565,7 +2565,7 @@ else
|
||||
print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
|
||||
@ -2590,7 +2590,7 @@ else
|
||||
print $langs->trans('BankAccount');
|
||||
print '<td>';
|
||||
if ($action != 'editbankaccount' && $user->rights->fournisseur->facture->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 '</td><td colspan="3">';
|
||||
if ($action == 'editbankaccount') {
|
||||
@ -2607,7 +2607,7 @@ else
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
print '<td><td align="right">';
|
||||
print '<td><td class="right">';
|
||||
if ($user->rights->fournisseur->facture->creer) print '<a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
|
||||
else print ' ';
|
||||
print '</td></tr></table>';
|
||||
@ -2730,8 +2730,8 @@ else
|
||||
print '<td class="liste_titre">' . ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '</td>';
|
||||
print '<td>'.$langs->trans('Date').'</td>';
|
||||
print '<td>'.$langs->trans('Type').'</td>';
|
||||
if (! empty($conf->banque->enabled)) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
|
||||
print '<td align="right">'.$langs->trans('Amount').'</td>';
|
||||
if (! empty($conf->banque->enabled)) print '<td class="right">'.$langs->trans('BankAccount').'</td>';
|
||||
print '<td class="right">'.$langs->trans('Amount').'</td>';
|
||||
print '<td width="18"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -2770,12 +2770,12 @@ else
|
||||
$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
||||
}
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($objp->baid > 0) print $bankaccountstatic->getNomUrl(1, 'transactions');
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="right">' . price($sign * $objp->amount) . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="right">' . price($sign * $objp->amount) . '</td>';
|
||||
print '<td class="center">';
|
||||
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deletepaiement&paiement_id='.$objp->rowid.'">';
|
||||
@ -2796,13 +2796,13 @@ else
|
||||
/*
|
||||
if ($object->paye == 0)
|
||||
{
|
||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans('AlreadyPaid').' :</td><td align="right">'.price($totalpaye).'</td><td></td></tr>';
|
||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("Billed").' :</td><td align="right">'.price($object->total_ttc).'</td><td></td></tr>';
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('AlreadyPaid').' :</td><td class="right">'.price($totalpaye).'</td><td></td></tr>';
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("Billed").' :</td><td class="right">'.price($object->total_ttc).'</td><td></td></tr>';
|
||||
|
||||
$resteapayer = $object->total_ttc - $totalpaye;
|
||||
|
||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans('RemainderToPay').' :</td>';
|
||||
print '<td align="right"'.($resteapayer?' class="amountremaintopay"':'').'>'.price($resteapayer).'</td><td></td></tr>';
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('RemainderToPay').' :</td>';
|
||||
print '<td class="right"'.($resteapayer?' class="amountremaintopay"':'').'>'.price($resteapayer).'</td><td></td></tr>';
|
||||
}
|
||||
*/
|
||||
|
||||
@ -2816,12 +2816,12 @@ else
|
||||
if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
// Total already paid
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||
if ($object->type != FactureFournisseur::TYPE_DEPOSIT)
|
||||
print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits');
|
||||
else
|
||||
print $langs->trans('AlreadyPaid');
|
||||
print ' :</td><td align="right"'.(($totalpaye > 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . '</td><td> </td></tr>';
|
||||
print ' :</td><td class="right"'.(($totalpaye > 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . '</td><td> </td></tr>';
|
||||
|
||||
//$resteapayer = $object->total_ttc - $totalpaye;
|
||||
$resteapayeraffiche = $resteapayer;
|
||||
@ -2845,15 +2845,15 @@ else
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$invoice->fetch($obj->fk_invoice_supplier_source);
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||
if ($invoice->type == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
print $langs->trans("CreditNote") . ' ';
|
||||
if ($invoice->type == FactureFournisseur::TYPE_DEPOSIT)
|
||||
print $langs->trans("Deposit") . ' ';
|
||||
print $invoice->getNomUrl(0);
|
||||
print ' :</td>';
|
||||
print '<td align="right">' . price($obj->amount_ttc) . '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">' . price($obj->amount_ttc) . '</td>';
|
||||
print '<td class="right">';
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&action=unlinkdiscount&discountid=' . $obj->rowid . '">' . img_delete() . '</a>';
|
||||
print '</td></tr>';
|
||||
$i ++;
|
||||
@ -2868,51 +2868,51 @@ else
|
||||
|
||||
// Paye partiellement 'escompte'
|
||||
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'discount_vat') {
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right nowrap">';
|
||||
print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1);
|
||||
print '</td><td align="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td> </td></tr>';
|
||||
print '</td><td class="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td> </td></tr>';
|
||||
$resteapayeraffiche = 0;
|
||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||
}
|
||||
// Paye partiellement ou Abandon 'badsupplier'
|
||||
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'badsupplier') {
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right nowrap">';
|
||||
print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1);
|
||||
print '</td><td align="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td> </td></tr>';
|
||||
print '</td><td class="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td> </td></tr>';
|
||||
// $resteapayeraffiche=0;
|
||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||
}
|
||||
// Paye partiellement ou Abandon 'product_returned'
|
||||
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'product_returned') {
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right nowrap">';
|
||||
print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1);
|
||||
print '</td><td align="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td> </td></tr>';
|
||||
print '</td><td class="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td> </td></tr>';
|
||||
$resteapayeraffiche = 0;
|
||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||
}
|
||||
// Paye partiellement ou Abandon 'abandon'
|
||||
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'abandon') {
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right nowrap">';
|
||||
$text = $langs->trans("HelpAbandonOther");
|
||||
if ($object->close_note)
|
||||
$text .= '<br><br><b>' . $langs->trans("Reason") . '</b>:' . $object->close_note;
|
||||
print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1);
|
||||
print '</td><td align="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td> </td></tr>';
|
||||
print '</td><td class="right">' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . '</td><td> </td></tr>';
|
||||
$resteapayeraffiche = 0;
|
||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||
}
|
||||
|
||||
// Billed
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right">' . $langs->trans("Billed") . ' :</td><td align="right">' . price($object->total_ttc) . '</td><td> </td></tr>';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">' . $langs->trans("Billed") . ' :</td><td class="right">' . price($object->total_ttc) . '</td><td> </td></tr>';
|
||||
|
||||
// Remainder to pay
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||
if ($resteapayeraffiche >= 0)
|
||||
print $langs->trans('RemainderToPay');
|
||||
else
|
||||
print $langs->trans('ExcessPaid');
|
||||
print ' :</td>';
|
||||
print '<td align="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($resteapayeraffiche) . '</td>';
|
||||
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($resteapayeraffiche) . '</td>';
|
||||
print '<td class="nowrap"> </td></tr>';
|
||||
}
|
||||
else // Credit note
|
||||
@ -2920,26 +2920,26 @@ else
|
||||
$cssforamountpaymentcomplete='amountpaymentneutral';
|
||||
|
||||
// Total already paid back
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||
print $langs->trans('AlreadyPaidBack');
|
||||
print ' :</td><td align="right">' . price($sign * $totalpaye) . '</td><td> </td></tr>';
|
||||
print ' :</td><td class="right">' . price($sign * $totalpaye) . '</td><td> </td></tr>';
|
||||
|
||||
// Billed
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right">' . $langs->trans("Billed") . ' :</td><td align="right">' . price($sign * $object->total_ttc) . '</td><td> </td></tr>';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">' . $langs->trans("Billed") . ' :</td><td class="right">' . price($sign * $object->total_ttc) . '</td><td> </td></tr>';
|
||||
|
||||
// Remainder to pay back
|
||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||
if ($resteapayeraffiche <= 0)
|
||||
print $langs->trans('RemainderToPayBack');
|
||||
else
|
||||
print $langs->trans('ExcessPaid');
|
||||
print ' :</td>';
|
||||
print '<td align="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($sign * $resteapayeraffiche) . '</td>';
|
||||
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($sign * $resteapayeraffiche) . '</td>';
|
||||
print '<td class="nowrap"> </td></tr>';
|
||||
|
||||
// Sold credit note
|
||||
// print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans('TotalTTC').' :</td>';
|
||||
// print '<td align="right" style="border: 1px solid;" bgcolor="#f0f0f0"><b>'.price($sign *
|
||||
// print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('TotalTTC').' :</td>';
|
||||
// print '<td class="right" style="border: 1px solid;" bgcolor="#f0f0f0"><b>'.price($sign *
|
||||
// $object->total_ttc).'</b></td><td> </td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -189,13 +189,13 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "f.rowid", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("RefSupplier", $_SERVER["PHP_SELF"], "f.ref_supplier", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateDue", $_SERVER["PHP_SELF"], "f.date_lim_reglement", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("DateDue", $_SERVER["PHP_SELF"], "f.date_lim_reglement", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "f.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AlreadyPaid", $_SERVER["PHP_SELF"], "am", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "fk_statut,paye,am", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "f.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("AlreadyPaid", $_SERVER["PHP_SELF"], "am", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "fk_statut,paye,am", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print "</tr>\n";
|
||||
|
||||
// Lines with filter fields
|
||||
@ -206,14 +206,14 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
print '<input class="flat" size="8" type="text" name="search_ref_supplier" value="'.$search_ref_supplier.'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="6" name="search_company" value="'.$search_company.'">';
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
print '</td><td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="8" name="search_amount_no_tax" value="'.$search_amount_no_tax.'">';
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
print '</td><td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="8" name="search_amount_all_tax" value="'.$search_amount_all_tax.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -245,8 +245,8 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
|
||||
print '<td class="nowrap">'.dol_trunc($objp->ref_supplier, 12).'</td>';
|
||||
|
||||
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->df), 'day')."</td>\n";
|
||||
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->datelimite), 'day');
|
||||
print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->df), 'day')."</td>\n";
|
||||
print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->datelimite), 'day');
|
||||
if ($facturestatic->hasDelay()) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
}
|
||||
@ -258,12 +258,12 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
print $companystatic->getNomUrl(1, 'supplier', 32);
|
||||
print '</td>';
|
||||
|
||||
print "<td align=\"right\">".price($objp->total_ht)."</td>";
|
||||
print "<td align=\"right\">".price($objp->total_ttc)."</td>";
|
||||
print "<td align=\"right\">".price($objp->am)."</td>";
|
||||
print "<td class=\"right\">".price($objp->total_ht)."</td>";
|
||||
print "<td class=\"right\">".price($objp->total_ttc)."</td>";
|
||||
print "<td class=\"right\">".price($objp->am)."</td>";
|
||||
|
||||
// Show invoice status
|
||||
print '<td align="right" class="nowrap">';
|
||||
print '<td class="right nowrap">';
|
||||
print $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 5, $objp->am);
|
||||
print '</td>';
|
||||
|
||||
@ -276,11 +276,11 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
}
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print "<td colspan=\"5\" align=\"left\">".$langs->trans("Total").": </td>";
|
||||
print "<td align=\"right\"><b>".price($total_ht)."</b></td>";
|
||||
print "<td align=\"right\"><b>".price($total_ttc)."</b></td>";
|
||||
print "<td align=\"right\"><b>".price($total_paid)."</b></td>";
|
||||
print '<td align="center"> </td>';
|
||||
print "<td colspan=\"5\" class=\"left\">".$langs->trans("Total").": </td>";
|
||||
print "<td class=\"right\"><b>".price($total_ht)."</b></td>";
|
||||
print "<td class=\"right\"><b>".price($total_ttc)."</b></td>";
|
||||
print "<td class=\"right\"><b>".price($total_paid)."</b></td>";
|
||||
print '<td class="center"> </td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -589,7 +589,7 @@ if ($resql)
|
||||
// Ref
|
||||
if (! empty($arrayfields['f.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.$search_ref.'">';
|
||||
print '</td>';
|
||||
}
|
||||
@ -630,7 +630,7 @@ if ($resql)
|
||||
// Date invoice
|
||||
if (! empty($arrayfields['f.datef']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
print '<td class="liste_titre nowraponall center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.dol_escape_htmltag($day).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
$formother->select_year($year?$year:-1, 'year', 1, 20, 5);
|
||||
@ -639,7 +639,7 @@ if ($resql)
|
||||
// Date due
|
||||
if (! empty($arrayfields['f.date_lim_reglement']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
print '<td class="liste_titre nowraponall center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day_lim" value="'.dol_escape_htmltag($day_lim).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month_lim" value="'.$month_lim.'">';
|
||||
$formother->select_year($year_lim?$year_lim:-1, 'year_lim', 1, 20, 5);
|
||||
@ -670,67 +670,67 @@ if ($resql)
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
// Company type
|
||||
if (! empty($arrayfields['typent.code']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone center">';
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
print '</td>';
|
||||
}
|
||||
// Payment mode
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
$form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 10);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ht']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_vat']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_localtax1" value="'.$search_montant_localtax1.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_localtax2" value="'.$search_montant_localtax2.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ttc']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['rtp']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
@ -755,13 +755,13 @@ if ($resql)
|
||||
// Status
|
||||
if (! empty($arrayfields['f.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="right">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||
$liststatus=array('0'=>$langs->trans("Draft"),'1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid"));
|
||||
print $form->selectarray('search_status', $liststatus, $search_status, 1);
|
||||
print '</td>';
|
||||
}
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="middle">';
|
||||
print '<td class="liste_titre middle">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -773,33 +773,33 @@ if ($resql)
|
||||
if (! empty($arrayfields['f.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['f.ref_supplier']['label'], $_SERVER["PHP_SELF"], 'f.ref_supplier', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.type']['checked'])) print_liste_field_titre($arrayfields['f.type']['label'], $_SERVER["PHP_SELF"], 'f.type', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.label']['checked'])) print_liste_field_titre($arrayfields['f.label']['label'], $_SERVER['PHP_SELF'], "f.libelle,f.rowid", '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER['PHP_SELF'], 'f.datef,f.rowid', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.date_lim_reglement']['checked'])) print_liste_field_titre($arrayfields['f.date_lim_reglement']['label'], $_SERVER['PHP_SELF'], "f.date_lim_reglement", '', $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER['PHP_SELF'], 'f.datef,f.rowid', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['f.date_lim_reglement']['checked'])) print_liste_field_titre($arrayfields['f.date_lim_reglement']['label'], $_SERVER['PHP_SELF'], "f.date_lim_reglement", '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER['PHP_SELF'], "p.ref", '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], 's.nom', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "fk_statut,paye,type", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "fk_statut,paye,type", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
$facturestatic=new FactureFournisseur($db);
|
||||
@ -853,7 +853,7 @@ if ($resql)
|
||||
//print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
//print '</td>';
|
||||
// Other picto tool
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->fournisseur->facture->dir_output.'/'.get_exdir($obj->facid, 2, 0, 0, $facturestatic, 'invoice_supplier').dol_sanitizeFileName($obj->ref);
|
||||
$subdir = get_exdir($obj->facid, 2, 0, 0, $facturestatic, 'invoice_supplier').dol_sanitizeFileName($obj->ref);
|
||||
@ -894,7 +894,7 @@ if ($resql)
|
||||
// Date
|
||||
if (! empty($arrayfields['f.datef']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($obj->datef), 'day');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -903,7 +903,7 @@ if ($resql)
|
||||
// Date limit
|
||||
if (! empty($arrayfields['f.date_lim_reglement']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($datelimit, 'day');
|
||||
print '<td class="center nowrap">'.dol_print_date($datelimit, 'day');
|
||||
if ($facturestatic->hasDelay())
|
||||
{
|
||||
print img_warning($langs->trans('Late'));
|
||||
@ -960,7 +960,7 @@ if ($resql)
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$tmparray=getCountry($obj->fk_pays, 'all');
|
||||
print $tmparray['label'];
|
||||
print '</td>';
|
||||
@ -969,7 +969,7 @@ if ($resql)
|
||||
// Type ent
|
||||
if (! empty($arrayfields['typent.code']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
|
||||
print $typenArray[$obj->typent_code];
|
||||
print '</td>';
|
||||
@ -988,7 +988,7 @@ if ($resql)
|
||||
// Amount HT
|
||||
if (! empty($arrayfields['f.total_ht']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_ht)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_ht)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalht'] += $obj->total_ht;
|
||||
@ -996,7 +996,7 @@ if ($resql)
|
||||
// Amount VAT
|
||||
if (! empty($arrayfields['f.total_vat']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_vat)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_vat)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalvat'] += $obj->total_vat;
|
||||
@ -1004,7 +1004,7 @@ if ($resql)
|
||||
// Amount LocalTax1
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_localtax1)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_localtax1)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totallocaltax1field']=$totalarray['nbfield'];
|
||||
$totalarray['totallocaltax1'] += $obj->total_localtax1;
|
||||
@ -1012,7 +1012,7 @@ if ($resql)
|
||||
// Amount LocalTax2
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_localtax2)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_localtax2)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totallocaltax2field']=$totalarray['nbfield'];
|
||||
$totalarray['totallocaltax2'] += $obj->total_localtax2;
|
||||
@ -1020,7 +1020,7 @@ if ($resql)
|
||||
// Amount TTC
|
||||
if (! empty($arrayfields['f.total_ttc']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_ttc)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_ttc)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalttc'] += $obj->total_ttc;
|
||||
@ -1028,7 +1028,7 @@ if ($resql)
|
||||
|
||||
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||
{
|
||||
print '<td align="right">'.(! empty($totalpay)?price($totalpay, 0, $langs):' ').'</td>'; // TODO Use a denormalized field
|
||||
print '<td class="right">'.(! empty($totalpay)?price($totalpay, 0, $langs):' ').'</td>'; // TODO Use a denormalized field
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalamfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalam'] += $totalpay;
|
||||
@ -1036,7 +1036,7 @@ if ($resql)
|
||||
|
||||
if (! empty($arrayfields['rtp']['checked']))
|
||||
{
|
||||
print '<td align="right">'.(! empty($remaintopay)?price($remaintopay, 0, $langs):' ').'</td>'; // TODO Use a denormalized field
|
||||
print '<td class="right">'.(! empty($remaintopay)?price($remaintopay, 0, $langs):' ').'</td>'; // TODO Use a denormalized field
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalrtpfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalrtp'] += $remaintopay;
|
||||
@ -1052,7 +1052,7 @@ if ($resql)
|
||||
// Date creation
|
||||
if (! empty($arrayfields['f.datec']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -1060,7 +1060,7 @@ if ($resql)
|
||||
// Date modification
|
||||
if (! empty($arrayfields['f.tms']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -1068,7 +1068,7 @@ if ($resql)
|
||||
// Status
|
||||
if (! empty($arrayfields['f.fk_statut']['checked']))
|
||||
{
|
||||
print '<td align="right" class="nowrap">';
|
||||
print '<td class="right nowrap">';
|
||||
// TODO $paiement is not yet defined
|
||||
print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $paiement, $obj->type);
|
||||
print "</td>";
|
||||
@ -1076,7 +1076,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
// Action column
|
||||
print '<td class="nowrap" align="center">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
@ -1111,13 +1111,13 @@ if ($resql)
|
||||
if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>';
|
||||
else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
elseif ($totalarray['totalhtfield'] == $i) print '<td align="right">'.price($totalarray['totalht']).'</td>';
|
||||
elseif ($totalarray['totalvatfield'] == $i) print '<td align="right">'.price($totalarray['totalvat']).'</td>';
|
||||
elseif ($totalarray['totallocaltax1field'] == $i) print '<td align="right">'.price($totalarray['totallocaltax1']).'</td>';
|
||||
elseif ($totalarray['totallocaltax2field'] == $i) print '<td align="right">'.price($totalarray['totallocaltax2']).'</td>';
|
||||
elseif ($totalarray['totalttcfield'] == $i) print '<td align="right">'.price($totalarray['totalttc']).'</td>';
|
||||
elseif ($totalarray['totalamfield'] == $i) print '<td align="right">'.price($totalarray['totalam']).'</td>';
|
||||
elseif ($totalarray['totalrtpfield'] == $i) print '<td align="right">'.price($totalarray['totalrtp']).'</td>';
|
||||
elseif ($totalarray['totalhtfield'] == $i) print '<td class="right">'.price($totalarray['totalht']).'</td>';
|
||||
elseif ($totalarray['totalvatfield'] == $i) print '<td class="right">'.price($totalarray['totalvat']).'</td>';
|
||||
elseif ($totalarray['totallocaltax1field'] == $i) print '<td class="right">'.price($totalarray['totallocaltax1']).'</td>';
|
||||
elseif ($totalarray['totallocaltax2field'] == $i) print '<td class="right">'.price($totalarray['totallocaltax2']).'</td>';
|
||||
elseif ($totalarray['totalttcfield'] == $i) print '<td class="right">'.price($totalarray['totalttc']).'</td>';
|
||||
elseif ($totalarray['totalamfield'] == $i) print '<td class="right">'.price($totalarray['totalam']).'</td>';
|
||||
elseif ($totalarray['totalrtpfield'] == $i) print '<td class="right">'.price($totalarray['totalrtp']).'</td>';
|
||||
else print '<td></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
@ -513,17 +513,17 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('Invoice').'</td>';
|
||||
print '<td>'.$langs->trans('RefSupplier').'</td>';
|
||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td align="center">'.$langs->trans('DateMaxPayment').'</td>';
|
||||
print '<td class="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td class="center">'.$langs->trans('DateMaxPayment').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td>'.$langs->trans('Currency').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>';
|
||||
print '<td align="right">'.$langs->trans('AmountTTC').'</td>';
|
||||
print '<td align="right">'.$langs->trans('AlreadyPaid').'</td>';
|
||||
print '<td align="right">'.$langs->trans('RemainderToPay').'</td>';
|
||||
print '<td align="center">'.$langs->trans('PaymentAmount').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>';
|
||||
print '<td class="right">'.$langs->trans('AmountTTC').'</td>';
|
||||
print '<td class="right">'.$langs->trans('AlreadyPaid').'</td>';
|
||||
print '<td class="right">'.$langs->trans('RemainderToPay').'</td>';
|
||||
print '<td class="center">'.$langs->trans('PaymentAmount').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td class="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$total=0;
|
||||
@ -566,18 +566,18 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
// Date
|
||||
if ($objp->df > 0 )
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->df), 'day').'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><b>!!!</b></td>';
|
||||
print '<td class="center"><b>!!!</b></td>';
|
||||
}
|
||||
|
||||
// Date Max Payment
|
||||
if ($objp->dlr > 0 )
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->dlr), 'day');
|
||||
|
||||
if ($invoice->hasDelay())
|
||||
@ -589,30 +589,30 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><b>--</b></td>';
|
||||
print '<td class="center"><b>--</b></td>';
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
{
|
||||
// Currency
|
||||
print '<td align="center">'.$objp->multicurrency_code."</td>\n";
|
||||
print '<td class="center">'.$objp->multicurrency_code."</td>\n";
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||
{
|
||||
print price($objp->multicurrency_total_ttc);
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||
{
|
||||
print price($objp->multicurrency_am);
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||
{
|
||||
print price($objp->multicurrency_total_ttc - $objp->multicurrency_am);
|
||||
@ -620,17 +620,17 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
||||
print '<td class="right">'.price($objp->total_ttc).'</td>';
|
||||
|
||||
print '<td align="right">'.price($objp->am);
|
||||
print '<td class="right">'.price($objp->am);
|
||||
if ($creditnotes) print '+'.price($creditnotes);
|
||||
if ($deposits) print '+'.price($deposits);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">'.price($remaintopay).'</td>';
|
||||
print '<td class="right">'.price($remaintopay).'</td>';
|
||||
|
||||
// Amount
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
|
||||
$namef = 'amount_'.$objp->facid;
|
||||
$nameRemain = 'remain_'.$objp->facid;
|
||||
@ -652,7 +652,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
// Multicurrency Price
|
||||
if (! empty($conf->multicurrency->enabled))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
|
||||
// Add remind multicurrency amount
|
||||
$namef = 'multicurrency_amount_'.$objp->facid;
|
||||
@ -688,19 +688,19 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
{
|
||||
// Print total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="4" align="left">'.$langs->trans('TotalTTC').':</td>';
|
||||
print '<td colspan="4" class="left">'.$langs->trans('TotalTTC').':</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
print '<td align="right"><b>'.price($total_ttc).'</b></td>';
|
||||
print '<td align="right"><b>'.price($totalrecu);
|
||||
print '<td class="right"><b>'.price($total_ttc).'</b></td>';
|
||||
print '<td class="right"><b>'.price($totalrecu);
|
||||
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
||||
if ($totalrecudeposits) print '+'.price($totalrecudeposits);
|
||||
print '</b></td>';
|
||||
print '<td align="right"><b>'.price(price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
||||
print '<td align="center" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
||||
print '<td class="right"><b>'.price(price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
||||
print '<td class="center" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
@ -874,30 +874,30 @@ if (empty($action))
|
||||
|
||||
// Lines for filters fields
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.dol_escape_htmltag($day).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.dol_escape_htmltag($month).'">';
|
||||
$formother->select_year($year?$year:-1, 'year', 1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="6" name="search_company" value="'.dol_escape_htmltag($search_company).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
$form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="4" name="search_payment_num" value="'.dol_escape_htmltag($search_payment_num).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -905,12 +905,12 @@ if (empty($action))
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], 'p.rowid', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], 'dp', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], 'dp', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], 'c.libelle', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "p.num_paiement", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'p.amount', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'p.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
//print_liste_field_titre("Invoice",$_SERVER["PHP_SELF"],'ref_supplier','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
@ -927,7 +927,7 @@ if (empty($action))
|
||||
// Date
|
||||
$dateformatforpayment = 'day';
|
||||
if (! empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment='dayhour';
|
||||
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->dp), $dateformatforpayment)."</td>\n";
|
||||
print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->dp), $dateformatforpayment)."</td>\n";
|
||||
|
||||
// Thirdparty
|
||||
print '<td>';
|
||||
@ -947,7 +947,7 @@ if (empty($action))
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">'.price($objp->pamount).'</td>';
|
||||
print '<td class="right">'.price($objp->pamount).'</td>';
|
||||
|
||||
// Ref invoice
|
||||
/*$invoicesupplierstatic->ref=$objp->ref_supplier;
|
||||
|
||||
@ -143,8 +143,8 @@ if ($year)
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Reporting").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Date").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Date").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if (is_resource($handle))
|
||||
@ -156,8 +156,8 @@ if ($year)
|
||||
$tfile = $dir . '/'.$year.'/'.$file;
|
||||
$relativepath = $year.'/'.$file;
|
||||
print '<tr class="oddeven">'.'<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=facture_fournisseur&file=payments/'.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a></td>';
|
||||
print '<td align="right">'.dol_print_size(dol_filesize($tfile)).'</td>';
|
||||
print '<td align="right">'.dol_print_date(dol_filemtime($tfile), "dayhour").'</td></tr>';
|
||||
print '<td class="right">'.dol_print_size(dol_filesize($tfile)).'</td>';
|
||||
print '<td class="right">'.dol_print_date(dol_filemtime($tfile), "dayhour").'</td></tr>';
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
@ -51,8 +51,8 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<td><?php echo $langs->trans("SupplierInvoice"); ?></td>
|
||||
<td><a href="<?php echo DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowBill"), "bill").' '.$objectlink->ref; ?></a></td>
|
||||
<td class="left"><?php echo $objectlink->ref_supplier; ?></td>
|
||||
<td align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
<td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||
<td class="right"><?php
|
||||
if ($user->rights->fournisseur->facture->lire) {
|
||||
$sign = 1;
|
||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = -1;
|
||||
@ -66,8 +66,8 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
||||
}
|
||||
} ?></td>
|
||||
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -77,11 +77,11 @@ if (count($linkedObjectBlock) > 1)
|
||||
<tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':''); ?>">
|
||||
<td><?php echo $langs->trans("Total"); ?></td>
|
||||
<td></td>
|
||||
<td align="center"></td>
|
||||
<td align="center"></td>
|
||||
<td align="right"><?php echo price($total); ?></td>
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
<td class="center"></td>
|
||||
<td class="center"></td>
|
||||
<td class="right"><?php echo price($total); ?></td>
|
||||
<td class="right"></td>
|
||||
<td class="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ if ($resql)
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Orders").'</td><td align="center">'.$langs->trans("Nb").'</td><td> </td>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Orders").'</td><td class="center">'.$langs->trans("Nb").'</td><td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $num)
|
||||
@ -80,8 +80,8 @@ if ($resql)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$commandestatic->LibStatut($row[1]).'</td>';
|
||||
print '<td align="center">'.$row[0].'</td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/fourn/commande/list.php?statut='.$row[1].'">'.$commandestatic->LibStatut($row[1], 3).'</a></td>';
|
||||
print '<td class="center">'.$row[0].'</td>';
|
||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/fourn/commande/list.php?statut='.$row[1].'">'.$commandestatic->LibStatut($row[1], 3).'</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
@ -139,14 +139,14 @@ if (! empty($conf->fournisseur->enabled))
|
||||
$companystatic->client=0;
|
||||
print $companystatic->getNomUrl(1, '', 16);
|
||||
print '</td>';
|
||||
print '<td align="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||
print '<td class="right nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||
$i++;
|
||||
$total += $obj->total_ttc;
|
||||
}
|
||||
if ($total>0)
|
||||
{
|
||||
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
print "<br>\n";
|
||||
@ -197,14 +197,14 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$companystatic->client=0;
|
||||
print $companystatic->getNomUrl(1, '', 16);
|
||||
print '</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
||||
print '</tr>';
|
||||
$tot_ttc+=$obj->total_ttc;
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td class="left">'.$langs->trans("Total").'</td>';
|
||||
print '<td colspan="2" align="right">'.price($tot_ttc).'</td>';
|
||||
print '<td colspan="2" class="right">'.price($tot_ttc).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
@ -250,7 +250,7 @@ if ($resql)
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("BoxTitleLastSuppliers", min($max, $num))."</td>\n";
|
||||
print '<td align="right">'.$langs->trans("DateModification")."</td>\n";
|
||||
print '<td class="right">'.$langs->trans("DateModification")."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
while ($obj = $db->fetch_object($resql) )
|
||||
@ -259,7 +259,7 @@ if ($resql)
|
||||
print '<td><a href="card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"), "company").'</a>';
|
||||
print " <a href=\"card.php?socid=".$obj->socid."\">".$obj->name."</a></td>\n";
|
||||
print '<td class="left">'.$obj->code_fournisseur.' </td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
||||
print '<td class="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
@ -298,7 +298,7 @@ if (count($companystatic->SupplierCategories))
|
||||
print '</td>'."\n";
|
||||
// TODO this page not exist
|
||||
/*
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print '<a href="stats.php?cat='.$rowid.'">('.$langs->trans("Stats").')</a>';
|
||||
print "</tr>\n";
|
||||
*/
|
||||
|
||||
@ -243,7 +243,7 @@ if ($resql)
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -255,9 +255,9 @@ if ($resql)
|
||||
print_liste_field_titre("RefSupplierShort", $_SERVER["PHP_SELF"], "ppf.ref_fourn", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Supplier", $_SERVER["PHP_SELF"], "ppf.fk_soc", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("BuyingPrice", $_SERVER["PHP_SELF"], "ppf.price", $param, "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "ppf.quantity", $param, "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("UnitPrice", $_SERVER["PHP_SELF"], "ppf.unitprice", $param, "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("BuyingPrice", $_SERVER["PHP_SELF"], "ppf.price", $param, "", '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "ppf.quantity", $param, "", '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("UnitPrice", $_SERVER["PHP_SELF"], "ppf.unitprice", $param, "", '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"]);
|
||||
print "</tr>\n";
|
||||
|
||||
@ -287,13 +287,13 @@ if ($resql)
|
||||
if ($companystatic->id > 0) print $companystatic->getNomUrl(1, 'supplier');
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">'.(isset($objp->price) ? price($objp->price) : '').'</td>';
|
||||
print '<td class="right">'.(isset($objp->price) ? price($objp->price) : '').'</td>';
|
||||
|
||||
print '<td align="right">'.$objp->qty.'</td>';
|
||||
print '<td class="right">'.$objp->qty.'</td>';
|
||||
|
||||
print '<td align="right">'.(isset($objp->unitprice) ? price($objp->unitprice) : '').'</td>';
|
||||
print '<td class="right">'.(isset($objp->unitprice) ? price($objp->unitprice) : '').'</td>';
|
||||
|
||||
print '<td align="right"></td>';
|
||||
print '<td class="right"></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@ -87,12 +87,12 @@ if ($socid > 0)
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="100" align="center">'.$langs->trans("Date").'</td>';
|
||||
print '<td width="100" class="center">'.$langs->trans("Date").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Debit").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Credit").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Balance").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Debit").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Credit").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Balance").'</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -119,15 +119,15 @@ if ($socid > 0)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print "<td align=\"center\">".dol_print_date($fac->date)."</td>\n";
|
||||
print "<td class=\"center\">".dol_print_date($fac->date)."</td>\n";
|
||||
print "<td><a href=\"facture/card.php?facid=$fac->id\">".img_object($langs->trans("ShowBill"), "bill")." ".$fac->ref."</a></td>\n";
|
||||
|
||||
print '<td aling="left">'.$fac->getLibStatut(2, $totalpaye).'</td>';
|
||||
print '<td align="right">'.price($fac->total_ttc)."</td>\n";
|
||||
print '<td class="left">'.$fac->getLibStatut(2, $totalpaye).'</td>';
|
||||
print '<td class="right">'.price($fac->total_ttc)."</td>\n";
|
||||
$solde = $solde + $fac->total_ttc;
|
||||
|
||||
print '<td align="right"> </td>';
|
||||
print '<td align="right">'.price($solde)."</td>\n";
|
||||
print '<td class="right"> </td>';
|
||||
print '<td class="right">'.price($solde)."</td>\n";
|
||||
|
||||
// Author
|
||||
print '<td class="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$objf->userid.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$objf->login.'</a></td>';
|
||||
@ -154,15 +154,15 @@ if ($socid > 0)
|
||||
$objp = $db->fetch_object($resqlp);
|
||||
//
|
||||
print '<tr class="oddeven">';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dp))."</td>\n";
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->dp))."</td>\n";
|
||||
print '<td>';
|
||||
print ' '; // Decalage
|
||||
print '<a href="paiement/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"), "payment").' '.$langs->trans("Payment").' '.$objp->rowid.'</td>';
|
||||
print "<td> </td>\n";
|
||||
print "<td> </td>\n";
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
$solde = $solde - $objp->amount;
|
||||
print '<td align="right">'.price($solde)."</td>\n";
|
||||
print '<td class="right">'.price($solde)."</td>\n";
|
||||
|
||||
// Auteur
|
||||
print '<td class="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$objp->userid.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$objp->login.'</a></td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user