diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 646d61da7a4..c035fd8158c 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1672,8 +1672,8 @@ else
}
/*
- * Confirmation du classement payé
- */
+ * Confirmation du classement payé
+ */
if ($_GET['action'] == 'payed' && $resteapayer <= 0)
{
$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPayed'),$langs->trans('ConfirmClassifyPayedBill',$fac->ref),'confirm_payed');
@@ -1682,21 +1682,28 @@ else
if ($_GET['action'] == 'payed' && $resteapayer > 0)
{
// Code
- $close[0]['code']='discount_vat';
- $close[1]['code']='badcustomer';
- $close[2]['code']='abandon';
+ $i=0;
+ $close[$i]['code']='discount_vat';$i++;
+ $close[$i]['code']='badcustomer';$i++;
+ //$close[$i]['code']='product_returned';$i++;
+ $close[$i]['code']='abandon';$i++;
// Help
- $close[0]['label']=$langs->trans("HelpEscompte").'
'.$langs->trans("ConfirmClassifyPayedPartiallyReasonDiscountVatDesc");
- $close[1]['label']=$langs->trans("ConfirmClassifyPayedPartiallyReasonBadCustomerDesc");
- $close[2]['label']=$langs->trans("ConfirmClassifyPayedPartiallyReasonOtherDesc");
+ $i=0;
+ $close[$i]['label']=$langs->trans("HelpEscompte").'
'.$langs->trans("ConfirmClassifyPayedPartiallyReasonDiscountVatDesc");$i++;
+ $close[$i]['label']=$langs->trans("ConfirmClassifyPayedPartiallyReasonBadCustomerDesc");$i++;
+ //$close[$i]['label']=$langs->trans("ConfirmClassifyPayedPartiallyReasonProductReturned");$i++;
+ $close[$i]['label']=$langs->trans("ConfirmClassifyPayedPartiallyReasonOtherDesc");$i++;
// Texte
- $close[0]['reason']=$html->textwithhelp($langs->transnoentities("ConfirmClassifyPayedPartiallyReasonDiscountVat",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[0]['label'],1);
- $close[1]['reason']=$html->textwithhelp($langs->transnoentities("ConfirmClassifyPayedPartiallyReasonBadCustomer",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[1]['label'],1);
- $close[2]['reason']=$html->textwithhelp($langs->transnoentities("ConfirmClassifyPayedPartiallyReasonOther",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[2]['label'],1);
- // arrayreasons
- $arrayreasons[$close[0]['code']]=$close[0]['reason'];
- $arrayreasons[$close[1]['code']]=$close[1]['reason'];
- $arrayreasons[$close[2]['code']]=$close[2]['reason'];
+ $i=0;
+ $close[$i]['reason']=$html->textwithhelp($langs->transnoentities("ConfirmClassifyPayedPartiallyReasonDiscountVat",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[$i]['label'],1);$i++;
+ $close[$i]['reason']=$html->textwithhelp($langs->transnoentities("ConfirmClassifyPayedPartiallyReasonBadCustomer",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[$i]['label'],1);$i++;
+ //$close[$i]['reason']=$html->textwithhelp($langs->transnoentities("ConfirmClassifyPayedPartiallyReasonProductReturned",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[$i]['label'],1);$i++;
+ $close[$i]['reason']=$html->textwithhelp($langs->transnoentities("ConfirmClassifyPayedPartiallyReasonOther",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[$i]['label'],1);$i++;
+ // arrayreasons[code]=reason
+ foreach($close as $key => $val)
+ {
+ $arrayreasons[$close[$key]['code']]=$close[$key]['reason'];
+ }
// Crée un tableau formulaire
$formquestion=array(
@@ -1916,8 +1923,9 @@ else
// Facturé
print '
| '.$langs->trans("Billed").' : | '.price($fac->total_ttc).' | '.$langs->trans('Currency'.$conf->monnaie).' |
';
$resteapayeraffiche=$resteapayer;
+
// Payé partiellement 'escompte'
- if ($fac->close_code == 'escompte')
+ if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'escompte')
{
print '| ';
print $html->textwithhelp($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1);
@@ -1925,15 +1933,23 @@ else
$resteapayeraffiche=0;
}
// Payé partiellement ou Abandon 'badcustomer'
- if (($fac->fk_statut == 2 || $fac->fk_statut == 3) && $fac->close_code == 'badcustomer')
+ if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'badcustomer')
{
print ' |
| ';
print $html->textwithhelp($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1);
print ' | '.price($fac->total_ttc - $totalpaye).' | '.$langs->trans('Currency'.$conf->monnaie).' |
';
+ //$resteapayeraffiche=0;
+ }
+ // Payé partiellement ou Abandon 'product_returned'
+ if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'product_returned')
+ {
+ print '| ';
+ print $html->textwithhelp($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1);
+ print ' | '.price($fac->total_ttc - $totalpaye).' | '.$langs->trans('Currency'.$conf->monnaie).' |
';
$resteapayeraffiche=0;
}
- // Abandon 'abandon'
- if (($fac->fk_statut == 2 || $fac->fk_statut == 3) && $fac->close_code == 'abandon')
+ // Payé partiellement ou Abandon 'abandon'
+ if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'abandon')
{
print '';
print $html->textwithhelp($langs->trans("Abandoned").':',$langs->trans("HelpAbandonOther"),-1);
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index b66a37e13d4..202b7ec46a5 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -125,11 +125,13 @@ ConfirmClassifyPayedPartiallyReasonAvoir=Remainder to pay (%s %s) is a di
ConfirmClassifyPayedPartiallyReasonDiscountNoVat=Remainder to pay (%s %s) is a discount granted because payment was made before term. J'accepte de perdre la TVA sur cet escompte.
ConfirmClassifyPayedPartiallyReasonDiscountVat=Remainder to pay (%s %s) is a discount granted because payment was made before term. Je récupère la TVA sur cet escompte sans avoir.
ConfirmClassifyPayedPartiallyReasonBadCustomer=Bad customer
+ConfirmClassifyPayedPartiallyReasonProductReturned=Products partially returned
ConfirmClassifyPayedPartiallyReasonOther=Debit irremediably not recoverable (other reason)
ConfirmClassifyPayedPartiallyReasonDiscountNoVatDesc=Ce choix est possible si votre facture était munie de la mention adéquate. (Exemple: « escompte net de taxe »)
ConfirmClassifyPayedPartiallyReasonDiscountVatDesc=Ce choix est possible si votre facture était munie de la mention adéquate. (Exemple: «seule la taxe correspondant au prix effectivement payé ouvre droit à déduction»)
ConfirmClassifyPayedPartiallyReasonAvoirDesc=Use this choice if all other does not suit
ConfirmClassifyPayedPartiallyReasonBadCustomerDesc=This choice will be use for bad customers with no hope to be paied
+ConfirmClassifyPayedPartiallyReasonProductReturnedDesc=This choice is used when apyment is not complete because some of products were returned
ConfirmClassifyPayedPartiallyReasonOtherDesc=Use this choice if all other does not suit
ConfirmCustomerPayment=Do you confirm this paiement input for %s %s ?
ValidateBill=Validate invoice
diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang
index b2bb6162917..c3bac9acf00 100644
--- a/htdocs/langs/fr_FR/bills.lang
+++ b/htdocs/langs/fr_FR/bills.lang
@@ -125,12 +125,14 @@ ConfirmClassifyPayedPartiallyReasonAvoir=Le reste
ConfirmClassifyPayedPartiallyReasonDiscountNoVat=Le reste à payer (%s %s) est un escompte accordé après facture. J'accepte de perdre la TVA sur cet escompte
ConfirmClassifyPayedPartiallyReasonDiscountVat=Le reste à payer (%s %s) est un escompte
ConfirmClassifyPayedPartiallyReasonBadCustomer=Mauvais payeur
+ConfirmClassifyPayedPartiallyReasonProductReturned=Produits en partie retournés
ConfirmClassifyPayedPartiallyReasonOther=Créance définitivement abandonnée (tout autre cas)
ConfirmClassifyPayedPartiallyReasonDiscountNoVatDesc=Ce choix est possible si votre facture était munie de la mention adéquate. (Exemple: «escompte net de taxe»)
ConfirmClassifyPayedPartiallyReasonDiscountVatDesc=Ce choix est possible si votre facture était munie de la mention adéquate. (Exemple: mention définissant l'escompte ou du genre «seule la taxe correspondant au prix effectivement payé ouvre droit à déduction»)
ConfirmClassifyPayedPartiallyReasonAvoirDesc=Ce choix est le choix à prendre si les autres ne sont pas applicables
ConfirmClassifyPayedPartiallyReasonBadCustomerDesc=Ce choix sera celui dans le cas d'un mauvais payeur
-ConfirmClassifyPayedPartiallyReasonOtherDesc=Ce choix sera celui dans tout autre cas
+ConfirmClassifyPayedPartiallyReasonProductReturnedDesc=Ce choix sera celui dans le cas paiement incomplet suite à retour d'une partie des produits
+ConfirmClassifyPayedPartiallyReasonOtherDesc=Ce choix sera celui dans tout autre cas. Par exemple, dans le cas d'un paiement partiel car une partie des produits a été retourné.
ConfirmClassifyAbandonReasonOther=Autre
ConfirmClassifyAbandonReasonOtherDesc=Ce choix sera celui dans tout autre cas. Par exemple suite à intention de créer une facture de remplacement.
ConfirmCustomerPayment=Confirmez-vous la saisie de ce réglement de %s %s ?
|