';
- $_GET['action']='';
+ $_GET['action']='';
}
}
else
@@ -100,12 +100,12 @@ if ($_GET['action'] == 'valid')
// Si non avoir, le signe doit etre positif
if ($facture->total_ht < 0)
{
- $mesg='
';
-
+
// Insertion action
require_once(DOL_DOCUMENT_ROOT.'/contact.class.php');
require_once(DOL_DOCUMENT_ROOT.'/actioncomm.class.php');
@@ -906,9 +906,9 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['c
$actioncomm->societe = new Societe($db,$fac->socid);
$actioncomm->user = $user; // User qui a fait l'action
$actioncomm->facid = $fac->id;
-
+
$ret=$actioncomm->add($user); // User qui saisit l'action
-
+
if ($ret < 0)
{
dolibarr_print_error($db);
@@ -960,18 +960,18 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
{
$fac = new Facture($db, 0, $_GET['facid']);
$fac->fetch($_GET['facid']);
-
+
if ($_REQUEST['model'])
{
$fac->set_pdf_model($user, $_REQUEST['model']);
}
-
+
if ($_REQUEST['lang_id'])
{
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
-
+
$result=facture_pdf_create($db, $fac->id, '', $fac->modelpdf, $outputlangs);
if ($result <= 0)
{
@@ -981,7 +981,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
else
{
Header ('Location: '.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'#builddoc');
- }
+ }
}
/*********************************************************************
@@ -1022,11 +1022,11 @@ $html = new Form($db);
if ($_GET['action'] == 'create')
{
$facturestatic=new Facture($db);
-
+
print_titre($langs->trans('NewBill'));
if ($mesg) print $mesg;
-
+
$soc = new Societe($db);
if ($_GET['propalid'])
@@ -1092,7 +1092,7 @@ if ($_GET['action'] == 'create')
// Ref
print '
'.$langs->trans('Ref').'
'.$langs->trans('Draft').'
';
-
+
/*
\todo
L'info "Reference commande client" est une carac de la commande et non de la facture.
@@ -1107,7 +1107,7 @@ if ($_GET['action'] == 'create')
print '';
}
- // Societe
+ // Tiers
print '
';
+ print '';
print '';
-
+
+ foreach ($formquestion as $key => $input)
+ {
+ if ($input['type'] == 'hidden') print '';
+ }
+
print "\n";
}
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index f69bd2b17ba..9d725bfacbb 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -40,13 +40,15 @@ Payments=Payments
PaymentType=Payment type
PaymentTypes=Payment types
ReceivedPayments=Received payments
-ReceivedCustomersPayments=Received customers payments
+ReceivedCustomersPayments=Payments received from customers
ReceivedCustomersPaymentsToValid=Received customers payments to validate
PaymentsReportsForYear=Payments reports for %s
PaymentsReports=Payments reports
PaymentsAlreadyDone=Payments already done
PaymentMode=Payment mode
PaymentConditionsShort=Payment conditions
+PaymentAmount=Payment amount
+PaymentHigherThanReminderToPay=Payment higher than reminder to pay
ClassifyPayed=Classify 'Payed'
ClassifyPayedPartially=Classify 'Payed partially'
ClassifyCanceled=Classify 'Abandonned'
@@ -119,6 +121,7 @@ ConfirmClassifyPayedPartiallyNoVat=Ce choix est possible si votre facture
ConfirmClassifyPayedPartiallyVat=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»)
ConfirmClassifyPayedPartiallyAvoir=Ce choix est le choix à prendre si les autres ne sont pas applicables
ConfirmClassifyPayedPartiallyAbandon=Ce choix sera celui dans le cas d'un mauvais payeur sans aucun espoir de recouvrement
+ConfirmCustomerPayment=Do you confirm this paiement input for %s %s ?
ValidateBill=Validate invoice
NumberOfBills=Nb of invoices
NumberOfBillsByMonth=Nb of invoices by month
diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang
index 8f780ab4458..d927efc9c9e 100644
--- a/htdocs/langs/fr_FR/bills.lang
+++ b/htdocs/langs/fr_FR/bills.lang
@@ -40,13 +40,15 @@ Payments=Paiements
PaymentType=Type de paiement
PaymentTypes=Types de paiements
ReceivedPayments=Paiements reçus
-ReceivedCustomersPayments=Paiements clients reçus
+ReceivedCustomersPayments=Paiements reçus du client
ReceivedCustomersPaymentsToValid=Paiements clients reçus à valider
PaymentsReportsForYear=Rapports de paiements pour %s
PaymentsReports=Rapports de paiements
PaymentsAlreadyDone=Versements déjà effectués
PaymentMode=Mode règlement
PaymentConditionsShort=Conditions règlement
+PaymentAmount=Montant paiement
+PaymentHigherThanReminderToPay=Paiement supérieur au reste à payer
ClassifyPayed=Classer 'Payée'
ClassifyPayedPartially=Classer 'Payée partiellement'
ClassifyCanceled=Classer 'Abandonnée'
@@ -119,6 +121,7 @@ ConfirmClassifyPayedPartiallyAvoir=Ce choix est le choix
ConfirmClassifyPayedPartiallyNoVat=Ce choix est possible si votre facture était munie de la mention adéquate. (Exemple: «escompte net de taxe»)
ConfirmClassifyPayedPartiallyVat=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»)
ConfirmClassifyPayedPartiallyAbandon=Ce choix sera celui dans le cas d'un mauvais payeur sans aucun espoir de recouvrement
+ConfirmCustomerPayment=Confirmez-vous la saisie de ce paiement de %s %s ?
ValidateBill=Valider facture
NumberOfBills=Nb de factures
NumberOfBillsByMonth=Nb de factures par mois
diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php
index 02fd50314ae..197ae4c43fa 100644
--- a/htdocs/paiement.class.php
+++ b/htdocs/paiement.class.php
@@ -73,12 +73,12 @@ class Paiement
function fetch($id)
{
$sql = 'SELECT p.rowid,'.$this->db->pdate('p.datep').' as dp, p.amount, p.statut, p.fk_bank';
- $sql .=', c.libelle as paiement_type';
- $sql .= ', p.num_paiement, p.note, b.fk_account';
- $sql .= ' FROM '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement as p';
- $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid ';
- $sql .= ' WHERE p.fk_paiement = c.id';
- $sql .= ' AND p.rowid = '.$id;
+ $sql.= ', c.code as type_code, c.libelle as type_libelle';
+ $sql.= ', p.num_paiement, p.note, b.fk_account';
+ $sql.= ' FROM '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement as p';
+ $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid ';
+ $sql.= ' WHERE p.fk_paiement = c.id';
+ $sql.= ' AND p.rowid = '.$id;
if ($this->db->query($sql))
{
@@ -93,7 +93,8 @@ class Paiement
$this->bank_line = $obj->fk_bank;
$this->montant = $obj->amount;
$this->note = $obj->note;
- $this->type_libelle = $obj->paiement_type;
+ $this->type_libelle = $obj->type_libelle;
+ $this->type_code = $obj->type_code;
$this->statut = $obj->statut;
return 1;
}
diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index 967a0854310..ae56cd9eb7c 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -479,6 +479,9 @@ alter table llx_facturedet_rec add column total_tva real;
alter table llx_facturedet_rec add column total_ttc real;
+update llx_facture set fk_facture_source=null where fk_facture_source is not null and type = 0;
+
+
update llx_boxes set fk_user = 0 where fk_user IS NULL;
ALTER TABLE llx_boxes modify fk_user integer default 0 NOT NULL;