diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index 8ef53f26203..7a7941da64d 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -325,7 +325,7 @@ else
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
$sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
$sql.= " b.fk_bordereau,";
- $sql.= " bc.number,";
+ $sql.= " bc.ref,";
$sql.= " ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ", ".MAIN_DB_PREFIX."bank as b";
@@ -376,7 +376,7 @@ else
$link='';
if ($objp->fk_bordereau>0) {
$remisestatic->id = $objp->fk_bordereau;
- $remisestatic->ref = $objp->number;
+ $remisestatic->ref = $objp->ref;
$link = ' '.$remisestatic->getNomUrl(1);
}
print '
'.$type_label.' '.($objp->num_chq?$objp->num_chq:'').$link.' | ';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 491c4ca041a..3bae221e6dd 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -3108,13 +3108,13 @@ else if ($id > 0 || ! empty($ref))
if ($object->type == Facture::TYPE_CREDIT_NOTE)
$sign = - 1;
- $nbrows = 9;
- $nbcols = 2;
+ $nbrows = 8;
+ $nbcols = 3;
if (! empty($conf->projet->enabled))
$nbrows ++;
- if (! empty($conf->banque->enabled))
- $nbcols ++;
- // if (! empty($soc->outstandingbill)) $nbrows++;
+ if (! empty($conf->banque->enabled)) {
+ $nbrows ++; $nbcols++;
+ }
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0)
$nbrows ++;
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0)
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 5c0dede1bbc..88cd24af359 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -593,8 +593,15 @@ class Contact extends CommonObject
$this->canvas = $obj->canvas;
$this->import_key = $obj->import_key;
+
+ // Define gender according to civility
+ if(in_array($this->civility_id, array('MR'))) {
+ $this->gender = 'man';
+ } else if(in_array($this->civility_id, array('MME','MLE'))) {
+ $this->gender = 'woman';
+ }
- // Recherche le user Dolibarr lie a ce contact
+ // Search Dolibarr user linked to this contact
$sql = "SELECT u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " WHERE u.fk_socpeople = ". $this->id;
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 5dfd3a230e9..13af259290c 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1324,6 +1324,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
// We update newmenu for special dynamic menus
if (!empty($user->rights->banque->lire) && $mainmenu == 'bank') // Entry for each bank account
{
+ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
$sql = "SELECT rowid, label, courant, rappro";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE entity = ".$conf->entity;
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index b7e22e9e42f..c1346c357d5 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1271,6 +1271,7 @@ if (empty($reshook))
$form = new Form($db);
$formfile = new FormFile($db);
$bankaccountstatic=new Account($db);
+$paymentstatic=new PaiementFourn($db);
llxHeader('',$langs->trans('SupplierInvoice'),'');
@@ -1871,7 +1872,7 @@ else
/*
* List of payments
*/
- $nbrows=9; $nbcols=2;
+ $nbrows=9; $nbcols=3;
if (! empty($conf->projet->enabled)) $nbrows++;
if (! empty($conf->banque->enabled)) { $nbrows++; $nbcols++; }
if (! empty($conf->incoterm->enabled)) $nbrows++;
@@ -1882,10 +1883,10 @@ else
print '';
- $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,';
+ $sql = 'SELECT p.datep as dp, p.ref, p.num_paiement, p.rowid, p.fk_bank,';
$sql.= ' c.id as paiement_type,';
$sql.= ' pf.amount,';
- $sql.= ' ba.rowid as baid, ba.ref, ba.label';
+ $sql.= ' ba.rowid as baid, ba.ref as baref, ba.label';
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as p';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid';
@@ -1902,6 +1903,7 @@ else
print '';
print '';
print '| '.$langs->trans('Payments').' | ';
+ print ''.$langs->trans('Date').' | ';
print ''.$langs->trans('Type').' | ';
if (! empty($conf->banque->enabled)) print ''.$langs->trans('BankAccount').' | ';
print ''.$langs->trans('Amount').' | ';
@@ -1915,16 +1917,23 @@ else
{
$objp = $db->fetch_object($result);
$var=!$var;
- print ' ';
- print '| '.img_object($langs->trans('ShowPayment'),'payment').' '.dol_print_date($db->jdate($objp->dp),'day')." | \n";
+ print ' | ';
+ $paymentstatic->id=$objp->rowid;
+ $paymentstatic->datepaye=$db->jdate($objp->dp);
+ $paymentstatic->ref=$objp->ref;
+ $paymentstatic->num_paiement=$objp->num_paiement;
+ $paymentstatic->payment_code=$objp->payment_code;
+ print $paymentstatic->getNomUrl(1);
+ print ' | ';
+ print ''.dol_print_date($db->jdate($objp->dp), 'day') . ' | ';
print '';
print $form->form_modes_reglement(null, $objp->paiement_type,'none').' '.$objp->num_paiement;
print ' | ';
if (! empty($conf->banque->enabled))
{
$bankaccountstatic->id=$objp->baid;
- $bankaccountstatic->ref=$objp->ref;
- $bankaccountstatic->label=$objp->ref;
+ $bankaccountstatic->ref=$objp->baref;
+ $bankaccountstatic->label=$objp->baref;
print '';
if ($objp->baid > 0) print $bankaccountstatic->getNomUrl(1,'transactions');
print ' | ';
diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
index 7ce46730aa9..094084d6849 100644
--- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
+++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
@@ -385,5 +385,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
ALTER TABLE llx_product_fournisseur_price ADD supplier_reputation varchar(10) NULL;
+ALTER TABLE llx_product ADD COLUMN default_vat_code varchar(10) after cost_price;
+
-- Delete old deprecated field
ALTER TABLE llx_product_stock DROP COLUMN pmp;
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index a3376a336bb..56e136f5e52 100755
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -6,6 +6,7 @@ NoErrorCommitIsDone=No error, we commit
ErrorButCommitIsDone=Errors found but we validate despite this
ErrorBadEMail=EMail %s is wrong
ErrorBadUrl=Url %s is wrong
+ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing.
ErrorLoginAlreadyExists=Login %s already exists.
ErrorGroupAlreadyExists=Group %s already exists.
ErrorRecordNotFound=Record not found.
|