Fix: Une facture classée payée partiellement ne doit pas aparraitre dans la liste des factures sur lesquelles un avoir est possible. En effet si elles ont été classée "payée partiellement" alors un motif a été donné et le manque a gagné peut etre imputé en compta. Il n'y a pas de trous dans la compta.
This commit is contained in:
parent
576b93e7a8
commit
f32673cb49
File diff suppressed because it is too large
Load Diff
@ -2304,8 +2304,8 @@ class Facture extends CommonObject
|
||||
|
||||
/**
|
||||
* \brief Renvoi liste des factures qualifiables pour avoir
|
||||
* Statut validee + pas deja remplacées
|
||||
* \param socid Id societe
|
||||
* Statut >= validee + pas classé payée completement + pas classé payée partiellement + pas deja remplacée
|
||||
* \param socid Id societe
|
||||
* \return array Tableau des factures ($id => $ref)
|
||||
*/
|
||||
function list_qualified_avoir_invoices($socid=0)
|
||||
@ -2318,7 +2318,9 @@ class Facture extends CommonObject
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid = pf.fk_facture";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as ff ON (f.rowid = ff.fk_facture_source AND ff.type=1)";
|
||||
$sql.= " WHERE f.fk_statut >= 1 AND f.paye = 0";
|
||||
$sql.= " WHERE f.fk_statut >= 1";
|
||||
$sql.= " AND f.paye = 0"; // Pas classé payé complètement
|
||||
$sql.= " AND f.close_code IS NULL"; // Pas classé payé partiellement
|
||||
$sql.= " AND ff.type IS NULL"; // Renvoi vrai si pas facture de remplacement
|
||||
if ($socid > 0) $sql.=" AND f.fk_soc = ".$socid;
|
||||
$sql.= " ORDER BY f.facnumber";
|
||||
|
||||
@ -135,6 +135,7 @@ ShowInvoiceAvoir=Show credit note
|
||||
ShowPayment=Show payment
|
||||
File=File
|
||||
AlreadyPayed=Already payed
|
||||
Abandoned=Abandoned
|
||||
RemainderToPay=Remainder to pay
|
||||
RemainderToTake=Remainder to take
|
||||
EscompteOffered=Discount offered (payment before term)
|
||||
@ -192,6 +193,8 @@ DiscountStillRemaining=Discount still remaining
|
||||
DiscountAlreadyCounted=Discount already counted
|
||||
BillAddress=Bill address
|
||||
HelpEscompte=This discount is a discount granted to customer because its paiement was made before term.
|
||||
HelpAbandonBadCustomer=This amount has been abandoned (customer said to be a bad customer) and is considered as an exceptionnal loose.
|
||||
HelpAbandonOther=This amount has been abandoned and is considered as an exceptionnal loose.
|
||||
# PaymentConditions
|
||||
PaymentConditionShortRECEP=Immediate
|
||||
PaymentConditionRECEP=Immediate
|
||||
|
||||
@ -186,6 +186,8 @@ DiscountStillRemaining=Remises fixes restant en cours
|
||||
DiscountAlreadyCounted=Remises fixes déjà appliquées
|
||||
BillAddress=Adresse de facturation
|
||||
HelpEscompte=Cette réduction est allouée au client car son paiement a été fait avant échéance.
|
||||
HelpAbandonBadCustomer=Ce montant a été abandonné (client jugé mauvais payeur) et est considéré comme un perte exceptionnelle.
|
||||
HelpAbandonOther=Ce montant a été abandonné et est considéré comme un perte exceptionnelle.
|
||||
# PaymentConditions=undefined
|
||||
PaymentConditionShortRECEP=À réception
|
||||
PaymentConditionRECEP=À réception de facture
|
||||
|
||||
@ -136,6 +136,7 @@ ShowInvoiceAvoir=Afficher facture avoir
|
||||
ShowPayment=Afficher réglement
|
||||
File=Fichier
|
||||
AlreadyPayed=Déjà réglé
|
||||
Abandoned=Abandonné
|
||||
RemainderToPay=Reste à payer
|
||||
RemainderToTake=Reste à encaisser
|
||||
EscompteOffered=Escompte (réglement avant échéance)
|
||||
@ -193,6 +194,8 @@ DiscountStillRemaining=Remises fixes restant en cours
|
||||
DiscountAlreadyCounted=Remises fixes 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 un perte exceptionnelle.
|
||||
HelpAbandonOther=Ce montant a été abandonné et est considéré comme un perte exceptionnelle.
|
||||
# PaymentConditions
|
||||
PaymentConditionShortRECEP=A réception
|
||||
PaymentConditionRECEP=A réception de facture
|
||||
|
||||
@ -515,7 +515,11 @@ function top_htmlhead($head, $title="", $target="")
|
||||
if ($conf->use_javascript || $conf->use_ajax)
|
||||
{
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_head.js"></script>'."\n";
|
||||
}
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/lib/lib_head_perso.js'))
|
||||
{
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_head_perso.js"></script>';
|
||||
}
|
||||
}
|
||||
if ($conf->use_ajax)
|
||||
{
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/lib/prototype.js"></script>'."\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user