Meilleur affichage liens factures de doit - remplacement sur PDF.
This commit is contained in:
parent
71682e3f33
commit
1fe933fa17
@ -2408,9 +2408,12 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Récurrente
|
// Récurrente
|
||||||
if (! $conf->global->FACTURE_DISABLE_RECUR)
|
if (! $conf->global->FACTURE_DISABLE_RECUR && $fac->type == 0)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="facture/fiche-rec.php?facid='.$fac->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>';
|
if (! $facidnext)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="facture/fiche-rec.php?facid='.$fac->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valider
|
// Valider
|
||||||
@ -2493,17 +2496,30 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?facid='.$fac->id.'&action=canceled">'.$langs->trans('ClassifyCanceled').'</a>';
|
if ($facidnext)
|
||||||
|
{
|
||||||
// \todo
|
print '<a class="butActionRefused">'.$langs->trans('ClassifyCanceled').'</span>';
|
||||||
// Ajouter bouton "Annuler et Créer facture remplacement"
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?facid='.$fac->id.'&action=canceled">'.$langs->trans('ClassifyCanceled').'</a>';
|
||||||
|
// \todo
|
||||||
|
// Ajouter bouton "Annuler et Créer facture remplacement"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Supprimer
|
// Supprimer
|
||||||
if ($fac->is_erasable() && $user->rights->facture->supprimer && $_GET['action'] != 'delete')
|
if ($fac->is_erasable() && $user->rights->facture->supprimer && $_GET['action'] != 'delete')
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
if ($facidnext)
|
||||||
|
{
|
||||||
|
print '<span class="butActionDeleteRefused">'.$langs->trans('Delete').'</span>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -875,6 +875,17 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$posy+=1;
|
$posy+=1;
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
|
|
||||||
|
$facidnext=$object->getIdReplacingInvoice('validated');
|
||||||
|
if ($object->type == 0 && $facidnext)
|
||||||
|
{
|
||||||
|
$objectreplacing=new Facture($this->db);
|
||||||
|
$objectreplacing->fetch($facidnext);
|
||||||
|
|
||||||
|
$posy+=5;
|
||||||
|
$pdf->SetXY(100,$posy);
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplacementByInvoice").' : '.$objectreplacing->ref, '', 'R');
|
||||||
|
}
|
||||||
if ($object->type == 1)
|
if ($object->type == 1)
|
||||||
{
|
{
|
||||||
$objectreplaced=new Facture($this->db);
|
$objectreplaced=new Facture($this->db);
|
||||||
@ -883,7 +894,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$posy+=5;
|
$posy+=5;
|
||||||
$pdf->SetXY(100,$posy);
|
$pdf->SetXY(100,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplaceInvoice", $objectreplaced->ref), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplacementInvoice").' : '.$objectreplaced->ref, '', 'R');
|
||||||
}
|
}
|
||||||
if ($object->type == 2)
|
if ($object->type == 2)
|
||||||
{
|
{
|
||||||
@ -893,7 +904,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$posy+=5;
|
$posy+=5;
|
||||||
$pdf->SetXY(100,$posy);
|
$pdf->SetXY(100,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CorrectInvoice", $objectreplaced->ref), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CorrectionInvoice").' : '.$objectreplaced->ref, '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
$posy+=5;
|
$posy+=5;
|
||||||
|
|||||||
@ -18,8 +18,11 @@ InvoiceAvoir=Credit note
|
|||||||
InvoiceAvoirAsk=Credit note to correct invoice
|
InvoiceAvoirAsk=Credit note to correct invoice
|
||||||
InvoiceAvoirDesc=The <b>credit note</b> is a negative invoice used to solve fact that an invoice has an higher amount that should be (all possible reasons) or a product returned after invoice was payed.
|
InvoiceAvoirDesc=The <b>credit note</b> is a negative invoice used to solve fact that an invoice has an higher amount that should be (all possible reasons) or a product returned after invoice was payed.
|
||||||
ReplaceInvoice=Replace invoice %s
|
ReplaceInvoice=Replace invoice %s
|
||||||
|
ReplacementInvoice=Replacement invoice
|
||||||
ReplacedByInvoice=Replaced by invoice %s
|
ReplacedByInvoice=Replaced by invoice %s
|
||||||
|
ReplacementByInvoice=Replaced by invoice
|
||||||
CorrectInvoice=Correct invoice %s
|
CorrectInvoice=Correct invoice %s
|
||||||
|
CorrectionInvoice=Correction invoice
|
||||||
NoReplacableInvoice=No replacable invoices
|
NoReplacableInvoice=No replacable invoices
|
||||||
NoInvoiceToCorrect=No invoice to correct
|
NoInvoiceToCorrect=No invoice to correct
|
||||||
InvoiceHasAvoir=Corrected by one or several invoices
|
InvoiceHasAvoir=Corrected by one or several invoices
|
||||||
|
|||||||
@ -18,8 +18,11 @@ InvoiceAvoir=Facture avoir
|
|||||||
InvoiceAvoirAsk=Facture avoir pour correction de la facture
|
InvoiceAvoirAsk=Facture avoir pour correction de la facture
|
||||||
InvoiceAvoirDesc=La <b>facture d'avoir</b> est une facture négative destinée à compenser une facture comportant un montant supérieur à ce qui aurait du (toutes causes possibles) ou parce qu'un produit a été retourné après que la facture soit payée.
|
InvoiceAvoirDesc=La <b>facture d'avoir</b> est une facture négative destinée à compenser une facture comportant un montant supérieur à ce qui aurait du (toutes causes possibles) ou parce qu'un produit a été retourné après que la facture soit payée.
|
||||||
ReplaceInvoice=Remplace la facture %s
|
ReplaceInvoice=Remplace la facture %s
|
||||||
|
ReplacementInvoice=Remplacement facture
|
||||||
ReplacedByInvoice=Remplacée par la facture %s
|
ReplacedByInvoice=Remplacée par la facture %s
|
||||||
|
ReplacementByInvoice=Remplacée par facture
|
||||||
CorrectInvoice=Corrige facture %s
|
CorrectInvoice=Corrige facture %s
|
||||||
|
CorrectionInvoice=Correction facture
|
||||||
NoReplacableInvoice=Pas de factures remplacables
|
NoReplacableInvoice=Pas de factures remplacables
|
||||||
NoInvoiceToCorrect=Pas de factures à corriger
|
NoInvoiceToCorrect=Pas de factures à corriger
|
||||||
InvoiceHasAvoir=Corrigée par un ou plusieurs avoirs
|
InvoiceHasAvoir=Corrigée par un ou plusieurs avoirs
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user