NEW: supplier credit notes: handle Excess Paid + translation
This commit is contained in:
parent
924a9c392c
commit
f5ad93b272
@ -276,12 +276,12 @@ if ($socid > 0)
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>'; // TODO adapt text
|
||||
print '<tr><td class="titlefield">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
|
||||
print '<td>'.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
|
||||
|
||||
if (! empty($user->fk_soc)) // No need to show this for external users
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>'; // TODO adapt text
|
||||
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
|
||||
print '<td>'.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
|
||||
}
|
||||
|
||||
@ -307,12 +307,12 @@ if ($socid > 0)
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>'; // TODO adapt text
|
||||
print '<tr><td class="titlefield">'.$langs->trans("SupplierAbsoluteDiscountAllUsers").'</td>';
|
||||
print '<td>'.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
|
||||
|
||||
if (! empty($user->fk_soc)) // No need to show this for external users
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>'; // TODO adapt text
|
||||
print '<tr><td>'.$langs->trans("SupplierAbsoluteDiscountMy").'</td>';
|
||||
print '<td>'.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
|
||||
}
|
||||
}
|
||||
@ -330,9 +330,10 @@ if ($socid > 0)
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
if($conf->global->MAIN_FEATURES_LEVEL > 0) {
|
||||
print '<tr><td>'.$langs->trans('DiscountType').'</td>';
|
||||
print '<td><input type="radio" name="discount_type" id="discount_type_0" selected value="0"/> <label for="discount_type_0">'.$langs->trans('Customer').'</label>';
|
||||
print ' <input type="radio" name="discount_type" id="discount_type_1" selected value="1"/> <label for="discount_type_1">'.$langs->trans('Supplier').'</label></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('DiscountType').'</td>';
|
||||
print '<td><input type="radio" name="discount_type" id="discount_type_0" selected value="0"/> <label for="discount_type_0">'.$langs->trans('Customer').'</label>';
|
||||
print ' <input type="radio" name="discount_type" id="discount_type_1" selected value="1"/> <label for="discount_type_1">'.$langs->trans('Supplier').'</label>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td><input type="text" size="5" name="amount_ht" value="'.price2num(GETPOST("amount_ht")).'">';
|
||||
@ -401,7 +402,7 @@ if ($socid > 0)
|
||||
if ($resql)
|
||||
{
|
||||
if($conf->global->MAIN_FEATURES_LEVEL > 0) {
|
||||
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); // TODO translate
|
||||
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
||||
}
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -536,7 +537,7 @@ if ($socid > 0)
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); // TODO translate
|
||||
print load_fiche_titre($langs->trans("SupplierDiscounts"), '', '');
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
||||
@ -585,7 +586,7 @@ if ($socid > 0)
|
||||
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
||||
$facturefournstatic->ref=$obj->ref;
|
||||
$facturefournstatic->type=$obj->type;
|
||||
print preg_replace('/\(EXCESS PAID\)/',$langs->trans("ExcessPaid"),$obj->description).' '.$facturefournstatic->getNomURl(1); // TODO translate ExcessPaid
|
||||
print preg_replace('/\(EXCESS PAID\)/',$langs->trans("ExcessPaid"),$obj->description).' '.$facturefournstatic->getNomURl(1);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
@ -705,7 +706,7 @@ if ($socid > 0)
|
||||
if ($resql2)
|
||||
{
|
||||
if($conf->global->MAIN_FEATURES_LEVEL > 0) {
|
||||
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); // TODO translate
|
||||
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
||||
}
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -855,7 +856,7 @@ if ($socid > 0)
|
||||
if ($resql) $resql2=$db->query($sql2);
|
||||
if ($resql2)
|
||||
{
|
||||
print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); // TODO translate
|
||||
print load_fiche_titre($langs->trans("SupplierDiscounts"), '', '');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
||||
@ -934,12 +935,12 @@ if ($socid > 0)
|
||||
print $obj->description;
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.'</a></td>'; // TODO adapt to supplier invoice of use getNomUrl
|
||||
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.'</a></td>';
|
||||
print '<td align="right">'.price($obj->amount_ht).'</td>';
|
||||
print '<td align="right">'.price2num($obj->tva_tx,'MU').'%</td>';
|
||||
print '<td align="right">'.price($obj->amount_ttc).'</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a>'; // TODO getNomUrl ?
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a>';
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -3963,7 +3963,13 @@ abstract class CommonObject
|
||||
$discount=new DiscountAbsolute($this->db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
$this->tpl['description'] = $langs->transnoentities("DiscountFromExcessReceived",$discount->getNomUrl(0));
|
||||
} // TODO handle (EXCESS PAID)
|
||||
}
|
||||
elseif ($line->desc == '(EXCESS PAID)')
|
||||
{
|
||||
$discount=new DiscountAbsolute($this->db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
$this->tpl['description'] = $langs->transnoentities("DiscountFromExcessPaid",$discount->getNomUrl(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->tpl['description'] = dol_trunc($line->desc,60);
|
||||
|
||||
@ -46,6 +46,7 @@ class DiscountAbsolute
|
||||
public $fk_facture; // Id invoice when a discount line is used into an invoice (for credit note)
|
||||
public $fk_facture_source; // Id facture avoir a l'origine de la remise
|
||||
public $ref_facture_source; // Ref facture avoir a l'origine de la remise
|
||||
public $ref_invoive_supplier_source;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -568,10 +569,11 @@ class DiscountAbsolute
|
||||
$result='';
|
||||
|
||||
if ($option == 'invoice') {
|
||||
$facid=! empty($this->discount_type)?$this->fk_invoice_supplier_source:$this->fk_facture_source;
|
||||
$label=$langs->trans("ShowDiscount").': '.$this->ref_facture_source;
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$this->fk_facture_source.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$facid.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
$ref=$this->ref_facture_source;
|
||||
$ref=! empty($this->discount_type)?$this->ref_invoice_supplier_source:$this->ref_facture_source;
|
||||
$picto='bill';
|
||||
}
|
||||
if ($option == 'discount') {
|
||||
|
||||
@ -1236,7 +1236,7 @@ class Form
|
||||
if (preg_match('/\(CREDIT_NOTE\)/', $desc)) $desc=preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $desc);
|
||||
if (preg_match('/\(DEPOSIT\)/', $desc)) $desc=preg_replace('/\(DEPOSIT\)/', $langs->trans("Deposit"), $desc);
|
||||
if (preg_match('/\(EXCESS RECEIVED\)/', $desc)) $desc=preg_replace('/\(EXCESS RECEIVED\)/', $langs->trans("ExcessReceived"), $desc);
|
||||
// TODO handle (EXCESS PAID)
|
||||
if (preg_match('/\(EXCESS PAID\)/', $desc)) $desc=preg_replace('/\(EXCESS PAID\)/', $langs->trans("ExcessPaid"), $desc);
|
||||
|
||||
$selectstring='';
|
||||
if ($selected > 0 && $selected == $obj->rowid) $selectstring=' selected';
|
||||
|
||||
@ -73,13 +73,15 @@ function doc_getlinedesc($line,$outputlangs,$hideref=0,$hidedesc=0,$issupplierli
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromCreditNote",$discount->ref_facture_source);
|
||||
$sourceref=!empty($discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromCreditNote",$sourceref);
|
||||
}
|
||||
elseif ($desc == '(DEPOSIT)' && $line->fk_remise_except)
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromDeposit",$discount->ref_facture_source);
|
||||
$sourceref=!empty($discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
||||
// Add date of deposit
|
||||
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) $libelleproduitservice.=' ('.dol_print_date($discount->datec,'day','',$outputlangs).')';
|
||||
}
|
||||
@ -88,7 +90,13 @@ function doc_getlinedesc($line,$outputlangs,$hideref=0,$hidedesc=0,$issupplierli
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromExcessReceived",$discount->ref_facture_source);
|
||||
} // TODO handle (EXCESS PAID)
|
||||
}
|
||||
elseif ($desc == '(EXCESS PAID)' && $line->fk_remise_except)
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromExcessPaid",$discount->ref_invoice_supplier_source);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($idprod)
|
||||
|
||||
@ -1236,13 +1236,15 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($object->lines[$i]->fk_remise_except);
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromCreditNote",$discount->ref_facture_source);
|
||||
$sourceref=!empty($discount->discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromCreditNote",$sourceref);
|
||||
}
|
||||
elseif ($desc == '(DEPOSIT)' && $object->lines[$i]->fk_remise_except)
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($object->lines[$i]->fk_remise_except);
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromDeposit",$discount->ref_facture_source);
|
||||
$sourceref=!empty($discount->discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromDeposit",$sourceref);
|
||||
// Add date of deposit
|
||||
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec,'day','',$outputlangs).')';
|
||||
}
|
||||
@ -1251,7 +1253,13 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($object->lines[$i]->fk_remise_except);
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromExcessReceived",$discount->ref_facture_source);
|
||||
} // TODO handle (EXCESS PAID)
|
||||
}
|
||||
elseif ($desc == '(EXCESS PAID)' && $object->lines[$i]->fk_remise_except)
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($object->lines[$i]->fk_remise_except);
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromExcessPaid",$discount->ref_invoice_supplier_source);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($idprod)
|
||||
|
||||
@ -72,7 +72,8 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
|
||||
$txt='';
|
||||
print img_object($langs->trans("ShowReduc"),'reduc').' ';
|
||||
if ($line->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
|
||||
elseif ($line->description == '(EXCESS RECEIVED)') $txt=$langs->trans("ExcessReceived"); // TODO handle (EXCESS PAID)
|
||||
elseif ($line->description == '(EXCESS RECEIVED)') $txt=$langs->trans("ExcessReceived");
|
||||
elseif ($line->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid");
|
||||
//else $txt=$langs->trans("Discount");
|
||||
print $txt;
|
||||
?>
|
||||
@ -100,7 +101,13 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
|
||||
$discount=new DiscountAbsolute($this->db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromExcessReceived",$discount->getNomUrl(0));
|
||||
} // TODO handle (EXCESS PAID)
|
||||
}
|
||||
elseif ($line->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0)
|
||||
{
|
||||
$discount=new DiscountAbsolute($this->db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromExcessPaid",$discount->getNomUrl(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ($txt?' - ':'').dol_htmlentitiesbr($line->description);
|
||||
|
||||
@ -1049,6 +1049,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Delete related discounts
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Delete linked object
|
||||
|
||||
@ -2167,10 +2167,10 @@ else
|
||||
|
||||
// Confirmation de la conversion de l'avoir en reduc
|
||||
if ($action == 'converttoreduc') {
|
||||
if($object->type == FactureFournisseur::TYPE_STANDARD) $type_fac = 'ExcessReceived'; // TODO translation trop-perçu => trop-payé
|
||||
if($object->type == FactureFournisseur::TYPE_STANDARD) $type_fac = 'ExcessPaid';
|
||||
elseif($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $type_fac = 'CreditNote';
|
||||
elseif($object->type == FactureFournisseur::TYPE_DEPOSIT) $type_fac = 'Deposit';
|
||||
$text = $langs->trans('ConfirmConvertToReduc', strtolower($langs->transnoentities($type_fac))); // TODO translation client => fournisseur
|
||||
$text = $langs->trans('ConfirmConvertToReducSupplier', strtolower($langs->transnoentities($type_fac)));
|
||||
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2);
|
||||
}
|
||||
|
||||
@ -2872,7 +2872,7 @@ else
|
||||
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>'; // TODO unlinkdiscount
|
||||
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)
|
||||
@ -2929,7 +2929,7 @@ else
|
||||
if ($resteapayeraffiche >= 0)
|
||||
print $langs->trans('RemainderToPay');
|
||||
else
|
||||
print $langs->trans('ExcessReceived');
|
||||
print $langs->trans('ExcessPaid');
|
||||
print ' :</td>';
|
||||
print '<td align="right" class="'.($resteapayeraffiche?'amountremaintopay':$cssforamountpaymentcomplete).'">' . price($resteapayeraffiche) . '</td>';
|
||||
print '<td class="nowrap"> </td></tr>';
|
||||
@ -3113,7 +3113,7 @@ else
|
||||
// For standard invoice with excess paid
|
||||
if ($object->type == FactureFournisseur::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $user->rights->fournisseur->facture->creer && empty($discount->id))
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc">'.$langs->trans('ConvertExcessReceivedToReduc').'</a></div>'; // TODO translation : trop-perçu => trop payé
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc">'.$langs->trans('ConvertExcessPaidToReduc').'</a></div>';
|
||||
}
|
||||
// For credit note
|
||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->fournisseur->facture->creer && $object->getSommePaiement() == 0) {
|
||||
|
||||
@ -67,6 +67,7 @@ PaidBack=Paid back
|
||||
DeletePayment=Delete payment
|
||||
ConfirmDeletePayment=Are you sure you want to delete this payment?
|
||||
ConfirmConvertToReduc=Do you want to convert this %s into an absolute discount ?<br>The amount will so be saved among all discounts and could be used as a discount for a current or a future invoice for this customer.
|
||||
ConfirmConvertToReducSupplier=Do you want to convert this %s into an absolute discount ?<br>The amount will so be saved among all discounts and could be used as a discount for a current or a future invoice for this supplier.
|
||||
SupplierPayments=Suppliers payments
|
||||
ReceivedPayments=Received payments
|
||||
ReceivedCustomersPayments=Payments received from customers
|
||||
@ -91,7 +92,7 @@ PaymentAmount=Payment amount
|
||||
ValidatePayment=Validate payment
|
||||
PaymentHigherThanReminderToPay=Payment higher than reminder to pay
|
||||
HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the rest to pay. <br> Edit your entry, otherwise confirm and think about creating a credit note of the excess received for each overpaid invoices.
|
||||
HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the rest to pay. <br> Edit your entry, otherwise confirm.
|
||||
HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the rest to pay. <br> Edit your entry, otherwise confirm and think about creating a credit note of the excess paid for each overpaid invoice.
|
||||
ClassifyPaid=Classify 'Paid'
|
||||
ClassifyPaidPartially=Classify 'Paid partially'
|
||||
ClassifyCanceled=Classify 'Abandoned'
|
||||
@ -110,6 +111,7 @@ DoPayment=Enter payment
|
||||
DoPaymentBack=Enter refund
|
||||
ConvertToReduc=Convert into future discount
|
||||
ConvertExcessReceivedToReduc=Convert excess received into future discount
|
||||
ConvertExcessPaidToReduc=Convert excess paid into future discount
|
||||
EnterPaymentReceivedFromCustomer=Enter payment received from customer
|
||||
EnterPaymentDueToCustomer=Make payment due to customer
|
||||
DisabledBecauseRemainderToPayIsZero=Disabled because remaining unpaid is zero
|
||||
@ -220,6 +222,7 @@ RemainderToPayBack=Remaining amount to refund
|
||||
Rest=Pending
|
||||
AmountExpected=Amount claimed
|
||||
ExcessReceived=Excess received
|
||||
ExcessPaid=Excess paid
|
||||
EscompteOffered=Discount offered (payment before term)
|
||||
EscompteOfferedShort=Discount
|
||||
SendBillRef=Submission of invoice %s
|
||||
@ -284,15 +287,19 @@ Deposits=Down payments
|
||||
DiscountFromCreditNote=Discount from credit note %s
|
||||
DiscountFromDeposit=Down payments from invoice %s
|
||||
DiscountFromExcessReceived=Payments from excess received of invoice %s
|
||||
DiscountFromExcessPaid=Payments from excess paid of invoice %s
|
||||
AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation
|
||||
CreditNoteDepositUse=Invoice must be validated to use this kind of credits
|
||||
NewGlobalDiscount=New absolute discount
|
||||
NewRelativeDiscount=New relative discount
|
||||
DiscountType=Discount type
|
||||
NoteReason=Note/Reason
|
||||
ReasonDiscount=Reason
|
||||
DiscountOfferedBy=Granted by
|
||||
DiscountStillRemaining=Discounts available
|
||||
DiscountAlreadyCounted=Discounts already consumed
|
||||
CustomerDiscounts=Customer discounts
|
||||
SupplierDiscounts=Supplier discounts
|
||||
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.
|
||||
|
||||
@ -271,8 +271,10 @@ CompanyHasAbsoluteDiscount=This customer has discount available (credits notes o
|
||||
CompanyHasDownPaymentOrCommercialDiscount=This customer has discount available (commercial, down payments) for <b>%s</b> %s
|
||||
CompanyHasCreditNote=This customer still has credit notes for <b>%s</b> %s
|
||||
CompanyHasNoAbsoluteDiscount=This customer has no discount credit available
|
||||
CustomerAbsoluteDiscountAllUsers=Absolute discounts (granted by all users)
|
||||
CustomerAbsoluteDiscountMy=Absolute discounts (granted by yourself)
|
||||
CustomerAbsoluteDiscountAllUsers=Absolute customer discounts (granted by all users)
|
||||
CustomerAbsoluteDiscountMy=Absolute customer discounts (granted by yourself)
|
||||
SupplierAbsoluteDiscountAllUsers=Absolute supplier discounts (granted by all users)
|
||||
SupplierAbsoluteDiscountMy=Absolute supplier discounts (granted by yourself)
|
||||
DiscountNone=None
|
||||
Supplier=Supplier
|
||||
AddContact=Create contact
|
||||
|
||||
@ -490,7 +490,8 @@ if ($sql_select)
|
||||
$txt='';
|
||||
print img_object($langs->trans("ShowReduc"),'reduc').' ';
|
||||
if ($objp->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
|
||||
elseif ($objp->description == '(EXCESS RECEIVED)') $txt=$langs->trans("ExcessReceived"); // TODO handle (EXCESS PAID)
|
||||
elseif ($objp->description == '(EXCESS RECEIVED)') $txt=$langs->trans("ExcessReceived");
|
||||
elseif ($objp->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid");
|
||||
//else $txt=$langs->trans("Discount");
|
||||
print $txt;
|
||||
?>
|
||||
@ -510,6 +511,12 @@ if ($sql_select)
|
||||
$discount->fetch($objp->fk_remise_except);
|
||||
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromExcessReceived",$discount->getNomUrl(0));
|
||||
}
|
||||
elseif ($objp->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0)
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($objp->fk_remise_except);
|
||||
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromExcessPaid",$discount->getNomUrl(0));
|
||||
}
|
||||
elseif ($objp->description == '(DEPOSIT)' && $objp->fk_remise_except > 0)
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
@ -517,7 +524,7 @@ if ($sql_select)
|
||||
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
|
||||
// Add date of deposit
|
||||
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')';
|
||||
} // TODO handle (EXCESS PAID)
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ($txt?' - ':'').dol_htmlentitiesbr($objp->description);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user