Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
af0f0bb853
@ -3330,7 +3330,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
|
print '<tr><td class="titlefield">' . $langs->trans('AmountHT') . '</td>';
|
||||||
print '<td class="nowrap">' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
print '<td class="nowrap">' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||||
|
|
||||||
// Vat
|
// Vat
|
||||||
@ -3694,7 +3694,6 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$formmargin->displayMarginInfos($object);
|
$formmargin->displayMarginInfos($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -3811,8 +3810,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
// modified by hook
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
// Editer une facture deja validee, sans paiement effectue et pas exporte en compta
|
// Editer une facture deja validee, sans paiement effectue et pas exporte en compta
|
||||||
if ($object->statut == 1)
|
if ($object->statut == 1)
|
||||||
|
|||||||
@ -790,7 +790,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
// Show Draft Watermark
|
// Show Draft Watermark
|
||||||
if($object->statut==0 && (! empty($conf->global->SHIPPING_DRAFT_WATERMARK)) )
|
if($object->statut==0 && (! empty($conf->global->SHIPPING_DRAFT_WATERMARK)) )
|
||||||
{
|
{
|
||||||
pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->SHIPPING_DRAFT_WATERMARK);
|
pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->SHIPPING_DRAFT_WATERMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Prepare la suite
|
//Prepare la suite
|
||||||
@ -861,11 +861,11 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$title=$outputlangs->transnoentities("SendingSheet");
|
$title=$outputlangs->transnoentities("SendingSheet");
|
||||||
$pdf->MultiCell($w, 4, $title, '', 'R');
|
$pdf->MultiCell($w, 4, $title, '', 'R');
|
||||||
$posy+=1;
|
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size + 1);
|
$pdf->SetFont('','', $default_font_size + 1);
|
||||||
|
|
||||||
$posy+=4;
|
$posy+=5;
|
||||||
|
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending") ." : ".$object->ref, '', 'R');
|
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending") ." : ".$object->ref, '', 'R');
|
||||||
@ -873,10 +873,10 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
// Date planned delivery
|
// Date planned delivery
|
||||||
if (! empty($object->date_delivery))
|
if (! empty($object->date_delivery))
|
||||||
{
|
{
|
||||||
$posy+=4;
|
$posy+=4;
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery,"day",false,$outputlangs,true), '', 'R');
|
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery,"day",false,$outputlangs,true), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($object->thirdparty->code_client))
|
if (! empty($object->thirdparty->code_client))
|
||||||
@ -889,11 +889,10 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
|
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size + 3);
|
$pdf->SetFont('','', $default_font_size + 3);
|
||||||
$Yoff=25;
|
$Yoff=25;
|
||||||
|
|
||||||
// Add list of linked orders
|
// Add list of linked orders
|
||||||
|
$origin = $object->origin;
|
||||||
$origin = $object->origin;
|
|
||||||
$origin_id = $object->origin_id;
|
$origin_id = $object->origin_id;
|
||||||
|
|
||||||
// TODO move to external function
|
// TODO move to external function
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -486,10 +486,10 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
// Reset fk_parent_line for no child products and special product
|
// Reset fk_parent_line for no child products and special product
|
||||||
if (($line->product_type != 9 && empty($line->fk_parent_line)) || $line->product_type == 9) {
|
if (($line->product_type != 9 && empty($line->fk_parent_line)) || $line->product_type == 9) {
|
||||||
$fk_parent_line = 0;
|
$fk_parent_line = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$line->fk_facture = $object->id;
|
$line->fk_facture_fourn = $object->id;
|
||||||
$line->fk_parent_line = $fk_parent_line;
|
$line->fk_parent_line = $fk_parent_line;
|
||||||
|
|
||||||
$line->subprice =-$line->subprice; // invert price for object
|
$line->subprice =-$line->subprice; // invert price for object
|
||||||
@ -2305,10 +2305,14 @@ else
|
|||||||
/*
|
/*
|
||||||
* List of payments
|
* List of payments
|
||||||
*/
|
*/
|
||||||
$nbrows=9; $nbcols=3;
|
$sign = 1;
|
||||||
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = - 1;
|
||||||
|
|
||||||
|
$nbrows=9; $nbcols=3;
|
||||||
if (! empty($conf->projet->enabled)) $nbrows++;
|
if (! empty($conf->projet->enabled)) $nbrows++;
|
||||||
if (! empty($conf->banque->enabled)) { $nbrows++; $nbcols++; }
|
if (! empty($conf->banque->enabled)) { $nbrows++; $nbcols++; }
|
||||||
if (! empty($conf->incoterm->enabled)) $nbrows++;
|
if (! empty($conf->incoterm->enabled)) $nbrows++;
|
||||||
|
if (! empty($conf->multicurrency->enabled)) $nbrows += 5;
|
||||||
|
|
||||||
// Local taxes
|
// Local taxes
|
||||||
if ($societe->localtax1_assuj=="1") $nbrows++;
|
if ($societe->localtax1_assuj=="1") $nbrows++;
|
||||||
@ -2333,7 +2337,7 @@ else
|
|||||||
$i = 0; $totalpaye = 0;
|
$i = 0; $totalpaye = 0;
|
||||||
print '<table class="noborder paymenttable" width="100%">';
|
print '<table class="noborder paymenttable" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans('Payments').'</td>';
|
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('Date').'</td>';
|
||||||
print '<td>'.$langs->trans('Type').'</td>';
|
print '<td>'.$langs->trans('Type').'</td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
|
if (! empty($conf->banque->enabled)) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
|
||||||
@ -2369,7 +2373,7 @@ else
|
|||||||
if ($objp->baid > 0) print $bankaccountstatic->getNomUrl(1,'transactions');
|
if ($objp->baid > 0) print $bankaccountstatic->getNomUrl(1,'transactions');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price($objp->amount).'</td>';
|
print '<td align="right">' . price($sign * $objp->amount) . '</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
@ -2388,6 +2392,7 @@ else
|
|||||||
print '<tr '.$bc[$var].'><td colspan="'.$nbcols.'" class="opacitymedium">'.$langs->trans("None").'</td><td></td><td></td></tr>';
|
print '<tr '.$bc[$var].'><td colspan="'.$nbcols.'" class="opacitymedium">'.$langs->trans("None").'</td><td></td><td></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if ($object->paye == 0)
|
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('AlreadyPaid').' :</td><td align="right">'.price($totalpaye).'</td><td></td></tr>';
|
||||||
@ -2398,7 +2403,8 @@ else
|
|||||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans('RemainderToPay').' :</td>';
|
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 '<td align="right"'.($resteapayer?' class="amountremaintopay"':'').'>'.price($resteapayer).'</td><td></td></tr>';
|
||||||
}
|
}
|
||||||
print '</table>';
|
*/
|
||||||
|
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2406,6 +2412,130 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||||
|
// Total already paid
|
||||||
|
print '<tr><td colspan="' . $nbcols . '" align="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>';
|
||||||
|
|
||||||
|
$resteapayeraffiche = $resteapayer;
|
||||||
|
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||||
|
|
||||||
|
// Loop on each credit note or deposit amount applied
|
||||||
|
$creditnoteamount = 0;
|
||||||
|
$depositamount = 0;
|
||||||
|
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
|
||||||
|
$sql .= " re.description, re.fk_facture_source";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re";
|
||||||
|
$sql .= " WHERE fk_facture = " . $object->id;
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$i = 0;
|
||||||
|
$invoice = new FactureFournisseur($db);
|
||||||
|
while ($i < $num) {
|
||||||
|
$obj = $db->fetch_object($resql);
|
||||||
|
$invoice->fetch($obj->fk_facture_source);
|
||||||
|
print '<tr><td colspan="' . $nbcols . '" align="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 '<a href="' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&action=unlinkdiscount&discountid=' . $obj->rowid . '">' . img_delete() . '</a>';
|
||||||
|
print '</td></tr>';
|
||||||
|
$i ++;
|
||||||
|
if ($invoice->type == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||||
|
$creditnoteamount += $obj->amount_ttc;
|
||||||
|
if ($invoice->type == FactureFournisseur::TYPE_DEPOSIT)
|
||||||
|
$depositamount += $obj->amount_ttc;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 $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>';
|
||||||
|
$resteapayeraffiche = 0;
|
||||||
|
$cssforamountpaymentcomplete = '';
|
||||||
|
}
|
||||||
|
// 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 $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>';
|
||||||
|
// $resteapayeraffiche=0;
|
||||||
|
$cssforamountpaymentcomplete = '';
|
||||||
|
}
|
||||||
|
// 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 $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>';
|
||||||
|
$resteapayeraffiche = 0;
|
||||||
|
$cssforamountpaymentcomplete = '';
|
||||||
|
}
|
||||||
|
// 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">';
|
||||||
|
$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>';
|
||||||
|
$resteapayeraffiche = 0;
|
||||||
|
$cssforamountpaymentcomplete = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Billed
|
||||||
|
print '<tr><td colspan="' . $nbcols . '" align="right">' . $langs->trans("Billed") . ' :</td><td align="right">' . price($object->total_ttc) . '</td><td> </td></tr>';
|
||||||
|
|
||||||
|
// Remainder to pay
|
||||||
|
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
||||||
|
if ($resteapayeraffiche >= 0)
|
||||||
|
print $langs->trans('RemainderToPay');
|
||||||
|
else
|
||||||
|
print $langs->trans('ExcessReceived');
|
||||||
|
print ' :</td>';
|
||||||
|
print '<td align="right"'.($resteapayeraffiche?' class="amountremaintopay"':$cssforamountpaymentcomplete).'>' . price($resteapayeraffiche) . '</td>';
|
||||||
|
print '<td class="nowrap"> </td></tr>';
|
||||||
|
}
|
||||||
|
else // Credit note
|
||||||
|
{
|
||||||
|
// Total already paid back
|
||||||
|
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
||||||
|
print $langs->trans('AlreadyPaidBack');
|
||||||
|
print ' :</td><td align="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>';
|
||||||
|
|
||||||
|
// Remainder to pay back
|
||||||
|
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
||||||
|
if ($resteapayeraffiche <= 0)
|
||||||
|
print $langs->trans('RemainderToPayBack');
|
||||||
|
else
|
||||||
|
print $langs->trans('ExcessPaydBack');
|
||||||
|
print ' :</td>';
|
||||||
|
print '<td align="right" bgcolor="#f0f0f0"><b>' . price($sign * $resteapayeraffiche) . '</b></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 *
|
||||||
|
// $object->total_ttc).'</b></td><td> </td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -2432,16 +2562,12 @@ else
|
|||||||
/*
|
/*
|
||||||
* Lines
|
* Lines
|
||||||
*/
|
*/
|
||||||
//$result = $object->getLinesArray();
|
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">';
|
||||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">
|
print '<input type="hidden" name="mode" value="">';
|
||||||
<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
|
print '<input type="hidden" name="socid" value="'.$societe->id.'">';
|
||||||
<input type="hidden" name="mode" value="">
|
|
||||||
<input type="hidden" name="id" value="'.$object->id.'">
|
|
||||||
<input type="hidden" name="socid" value="'.$societe->id.'">
|
|
||||||
';
|
|
||||||
|
|
||||||
if (! empty($conf->use_javascript_ajax) && $object->statut == FactureFournisseur::STATUS_DRAFT) {
|
if (! empty($conf->use_javascript_ajax) && $object->statut == FactureFournisseur::STATUS_DRAFT) {
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
|
||||||
@ -2449,7 +2575,7 @@ else
|
|||||||
|
|
||||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
||||||
|
|
||||||
global $forceall, $senderissupplier, $dateSelector, $inputalsopricewithtax;
|
global $forceall, $senderissupplier, $dateSelector, $inputalsopricewithtax;
|
||||||
$forceall=1; $senderissupplier=1; $dateSelector=0; $inputalsopricewithtax=1;
|
$forceall=1; $senderissupplier=1; $dateSelector=0; $inputalsopricewithtax=1;
|
||||||
|
|
||||||
// Show object lines
|
// Show object lines
|
||||||
@ -2524,7 +2650,6 @@ else
|
|||||||
else print '<a class="butActionRefused" href="#">'.$langs->trans('SendByMail').'</a>';
|
else print '<a class="butActionRefused" href="#">'.$langs->trans('SendByMail').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Make payments
|
// Make payments
|
||||||
if ($action != 'edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
if ($action != 'edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user