New: Can add a discount directly when building invoice
This commit is contained in:
parent
e8a49fe288
commit
2cd2f001cf
@ -2065,15 +2065,18 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Relative and absolute discounts
|
||||
print '<tr><td>'.$langs->trans('Discounts');
|
||||
$addabsolutediscount=' <a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("AddGlobalDiscount").'</a>';
|
||||
$addcreditnote=' <a href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$soc->id.'&type=2&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("AddCreditNote").'</a>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Discounts');
|
||||
print '</td><td colspan="5">';
|
||||
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
|
||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||
print '. ';
|
||||
|
||||
if ($absolute_discount > 0)
|
||||
{
|
||||
if ($object->statut > 0 || $object->type == 2 || $object->type == 3)
|
||||
print '. ';
|
||||
if ($object->statut > 0 || $object->type == 2 || $object->type == 3)
|
||||
{
|
||||
if ($object->statut == 0)
|
||||
{
|
||||
@ -2100,9 +2103,14 @@ else
|
||||
// Remise dispo de type remise fixe (not credit note)
|
||||
$filter='fk_facture_source IS NULL';
|
||||
print '<br>';
|
||||
$html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id',$soc->id, $absolute_discount, $filter, $resteapayer);
|
||||
$html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id',$soc->id, $absolute_discount, $filter, $resteapayer, ' - '.$addabsolutediscount);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' - '.$addabsolutediscount.'<br>';
|
||||
else print '. ';
|
||||
}
|
||||
if ($absolute_creditnote > 0)
|
||||
{
|
||||
// If validated, we show link "add credit note to payment"
|
||||
@ -2130,13 +2138,13 @@ else
|
||||
{
|
||||
print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
|
||||
}
|
||||
if ($object->statut == 0 && $object->type != 2 && $object->type != 3)
|
||||
/*if ($object->statut == 0 && $object->type != 2 && $object->type != 3)
|
||||
{
|
||||
if (! $absolute_discount && ! $absolute_creditnote) print '<br>';
|
||||
$addabsolutediscount=' <a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("AddDiscount").'</a>';
|
||||
$addcreditnote=' <a href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$soc->id.'&type=2&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("AddCreditNote").'</a>';
|
||||
print $addabsolutediscount.' - '.$addcreditnote;
|
||||
}
|
||||
//print ' - ';
|
||||
print $addabsolutediscount;
|
||||
//print ' - '.$addcreditnote; // We disbale link to credit note
|
||||
}*/
|
||||
print '</td></tr>';
|
||||
|
||||
// Date invoice
|
||||
|
||||
@ -233,7 +233,7 @@ Reductions=Reductions
|
||||
ReductionsShort=Reduc.
|
||||
Discount=Discount
|
||||
Discounts=Discounts
|
||||
AddDiscount=Create discount
|
||||
AddDiscount=Create absolute discount
|
||||
AddCreditNote=Create credit note
|
||||
ShowDiscount=Show discount
|
||||
RelativeDiscount=Relative discount
|
||||
@ -246,14 +246,14 @@ DiscountFromCreditNote=Discount from credit note %s
|
||||
DiscountFromDeposit=Payments from deposit invoice %s
|
||||
AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation
|
||||
CreditNoteDepositUse=Invoice must be validated to use this king of credits
|
||||
NewGlobalDiscount=New fix discount
|
||||
NewGlobalDiscount=New absolute discount
|
||||
NewRelativeDiscount=New relative discount
|
||||
NoteReason=Note/Reason
|
||||
ReasonDiscount=Reason
|
||||
AddGlobalDiscount=Add discount
|
||||
DiscountOfferedBy=Granted by
|
||||
DiscountStillRemaining=Discount still remaining
|
||||
DiscountAlreadyCounted=Discount already counted
|
||||
DiscountStillRemaining=Discounts still remaining
|
||||
DiscountAlreadyCounted=Discounts already counted
|
||||
BillAddress=Bill address
|
||||
HelpEscompte=This discount is a discount granted to customer because its payment was made before term.
|
||||
HelpAbandonBadCustomer=This amount has been abandoned (customer said to be a bad customer) and is considered as an exceptional loose.
|
||||
|
||||
@ -153,7 +153,7 @@ CustomerRelativeDiscount=Relative customer discount
|
||||
CustomerAbsoluteDiscount=Absolute customer discount
|
||||
CustomerRelativeDiscountShort=Relative discount
|
||||
CustomerAbsoluteDiscountShort=Absolute discount
|
||||
CompanyHasRelativeDiscount=This customer has a discount of <b>%s%%</b>
|
||||
CompanyHasRelativeDiscount=This customer has a default discount of <b>%s%%</b>
|
||||
CompanyHasNoRelativeDiscount=This customer has no relative discount by default
|
||||
CompanyHasAbsoluteDiscount=This customer still has discount credits for <b>%s %s</b>
|
||||
CompanyHasCreditNote=This customer still has credit notes or previous deposits for <b>%s %s</b>
|
||||
|
||||
@ -234,7 +234,7 @@ RelativeDiscount=Remise relative
|
||||
GlobalDiscount=Remise fixe
|
||||
CreditNote=Avoir
|
||||
CreditNotes=Avoirs
|
||||
AddDiscount=Créer remise
|
||||
AddDiscount=Créer remise fixe
|
||||
AddCreditNote=Créer facture avoir
|
||||
Deposit=Acompte
|
||||
Deposits=Acomptes
|
||||
@ -248,8 +248,8 @@ NoteReason=Note/Motif
|
||||
ReasonDiscount=Motif
|
||||
AddGlobalDiscount=Ajouter remise fixe
|
||||
DiscountOfferedBy=Accordé par
|
||||
DiscountStillRemaining=Remises fixes restant en cours
|
||||
DiscountAlreadyCounted=Remises fixes déjà appliquées
|
||||
DiscountStillRemaining=Remises restant en cours
|
||||
DiscountAlreadyCounted=Remises déjà appliquées
|
||||
BillAddress=Adresse de facturation
|
||||
HelpEscompte=Un <b>escompte</b> est une remise accordée, sur une facture donnée, à un client car ce dernier a réalisé son règlement bien avant l'échéance.
|
||||
HelpAbandonBadCustomer=Ce montant a été abandonné (client jugé mauvais payeur) et est considéré comme une perte exceptionnelle.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user