';
- print '| '.$langs->trans('Company').' | '.img_object($langs->trans("ShowCompany"),'company').' '.$obj->nom." |
\n";
+ print '| '.$langs->trans('Company').' | '.$facture->client->getNomUrl(4)." |
\n";
print '| '.$langs->trans('Date').' | ';
if (!empty($_POST['remonth']) && !empty($_POST['reday']) && !empty($_POST['reyear']))
@@ -247,31 +243,44 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'add_paiement')
print " | \n";
print '';
- print ' |
';
+ print '';
print '| '.$langs->trans('Numero').' | Numéro du chèque / virement |
';
+ print '';
if ($conf->banque->enabled)
{
- print '
| '.$langs->trans('AccountToCredit').' | ';
+ if ($facture->type != 2) print ' | '.$langs->trans('AccountToCredit').' | ';
+ if ($facture->type == 2) print ''.$langs->trans('AccountToDebit').' | ';
+ print '';
$html->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',1);
- print " |
\n";
+ print '';
}
else
{
- print '| |
';
+ print ' | ';
}
+ print "\n";
/*
* Autres factures impayées
*/
- $sql = 'SELECT f.rowid as facid,f.facnumber,f.total_ttc,'.$db->pdate('f.datef').' as df';
- $sql .= ', sum(pf.amount) as am';
- $sql .= ' FROM '.MAIN_DB_PREFIX.'facture as f';
- $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid';
- $sql .= ' WHERE f.fk_soc = '.$facture->socid;
- $sql .= ' AND f.paye = 0';
- $sql .= ' AND f.fk_statut = 1'; // Statut=0 => non validée, Statut=2 => annulée
+ $sql = 'SELECT f.rowid as facid, f.facnumber, f.total_ttc, f.type, ';
+ $sql.= $db->pdate('f.datef').' as df, ';
+ $sql.= ' sum(pf.amount) as am';
+ $sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
+ $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid';
+ $sql.= ' WHERE f.fk_soc = '.$facture->socid;
+ $sql.= ' AND f.paye = 0';
+ $sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validée, Statut=2 => annulée
+ if ($facture->type != 2)
+ {
+ $sql .= ' AND type in (0,1)'; // Facture standard ou de remplacement
+ }
+ else
+ {
+ $sql .= ' AND type = 2';
+ }
$sql .= ' GROUP BY f.facnumber';
$resql = $db->query($sql);
if ($resql)
@@ -283,7 +292,8 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'add_paiement')
print '| ';
print '';
print "\n";
- }
+
}
}
@@ -419,5 +433,5 @@ if (! $_GET['action'] && ! $_POST['action'])
$db->close();
-llxFooter('Dernière modification $Date$ révision $Revision$');
+llxFooter('$Date$ - $Revision$');
?>
diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang
index 5b03953bd95..15c60550d20 100644
--- a/htdocs/langs/en_US/banks.lang
+++ b/htdocs/langs/en_US/banks.lang
@@ -73,6 +73,7 @@ ConciliationForAccount=Conciliate this account
IncludeClosedAccount=Include closed accounts
OnlyOpenedAccount=Only opened accounts
AccountToCredit=Account to credit
+AccountToDebit=Account to debit
DisableConciliation=Disable conciliation feature for this account
ConciliationDisabled=Conciliation feature disabled
StatusAccountOpened=Opened
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 8f83d440464..f69bd2b17ba 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -60,6 +60,8 @@ SendByMail=EMail
SendRemindByMail=EMail reminder
DoPaiement=Do payment
DoPayment=Do payment
+EnterPaymentReceivedFromCustomer=Enter payment received from customer
+EnterPaymentDueToCustomer=Make payment due to customer
VAT=VAT
VATRate=VAT Rate
Amount=Amount
diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang
index fc7bc118b9e..025841aeee0 100644
--- a/htdocs/langs/fr_FR/banks.lang
+++ b/htdocs/langs/fr_FR/banks.lang
@@ -73,6 +73,7 @@ ConciliationForAccount=Rapprochements sur ce compte
IncludeClosedAccount=Inclure comptes fermés
OnlyOpenedAccount=Uniquement comptes ouverts
AccountToCredit=Compte à créditer
+AccountToDebit=Compte à débiter
DisableConciliation=Désactiver la fonction de rapprochement pour ce compte
ConciliationDisabled=Fonction rapprochement désactivée
StatusAccountOpened=Ouvert
diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang
index f3c5df54fa2..bad1b472889 100644
--- a/htdocs/langs/fr_FR/bills.lang
+++ b/htdocs/langs/fr_FR/bills.lang
@@ -60,6 +60,8 @@ SendByMail=Envoyer
SendRemindByMail=Envoyer rappel
DoPaiement=Émettre paiement
DoPayment=Émettre paiement
+EnterPaymentReceivedFromCustomer=Saisie d'un paiement reçu du client
+EnterPaymentDueToCustomer=Réaliser paiement d'avoirs dus au client
VAT=TVA
VATRate=Taux TVA
Amount=Montant
|