From 1901b2fb3bed1bab01dc96bc9234a60db79f27b8 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 19 Sep 2015 07:15:13 +0200 Subject: [PATCH 1/5] Missing translations in checks deposits exports --- htdocs/core/modules/modBanque.class.php | 2 +- htdocs/langs/en_US/bills.lang | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index efb242aca94..5103e76b4e7 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -164,7 +164,7 @@ class modBanque extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='Bordereaux remise Chq/Fact'; $this->export_permission[$r]=array(array("banque","export")); - $this->export_fields_array[$r]=array("bch.rowid"=>"bordereauid","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation", + $this->export_fields_array[$r]=array("bch.rowid"=>"depositid","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation", "bch.date_bordereau"=>"Date","bch.amount"=>"Total","bch.nbcheque"=>"NbCheque","bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","f.facnumber"=>"InvoiceRef" ); $this->export_TypeFields_array[$r]=array('ba.ref'=>'Text','ba.label'=>'Text','b.datev'=>'Date','b.num_chq'=>'Text','b.amount'=>'Numeric','b.num_releve'=>'Text','b.datec'=>"Date", diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index a78ff96511e..54a626b5ae9 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -383,6 +383,8 @@ ChequesReceipts=Checks receipts ChequesArea=Checks deposits area ChequeDeposits=Checks deposits Cheques=Checks +DepositId=Id deposit +NbCheque=Number of checks CreditNoteConvertedIntoDiscount=This credit note or deposit invoice has been converted into %s UsBillingContactAsIncoiveRecipientIfExist=Use customer billing contact address instead of third party address as recipient for invoices ShowUnpaidAll=Show all unpaid invoices From 49f671eb1d430b0b2850942c11dc3e17a89a7da3 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 19 Sep 2015 07:24:32 +0200 Subject: [PATCH 2/5] Correct name --- htdocs/core/modules/modBanque.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index 5103e76b4e7..aa83133bc08 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -164,7 +164,7 @@ class modBanque extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='Bordereaux remise Chq/Fact'; $this->export_permission[$r]=array(array("banque","export")); - $this->export_fields_array[$r]=array("bch.rowid"=>"depositid","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation", + $this->export_fields_array[$r]=array("bch.rowid"=>"DepositId","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation", "bch.date_bordereau"=>"Date","bch.amount"=>"Total","bch.nbcheque"=>"NbCheque","bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","f.facnumber"=>"InvoiceRef" ); $this->export_TypeFields_array[$r]=array('ba.ref'=>'Text','ba.label'=>'Text','b.datev'=>'Date','b.num_chq'=>'Text','b.amount'=>'Numeric','b.num_releve'=>'Text','b.datec'=>"Date", From 7d4a9b17b6d08d041637e25322dd4aacc1e992ec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 Sep 2015 13:59:22 +0200 Subject: [PATCH 3/5] FIX Creation of tables or keys must not be done with a random order. --- htdocs/core/modules/DolibarrModules.class.php | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index c886741fc41..0de1c7ab4ab 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -623,8 +623,14 @@ abstract class DolibarrModules { $dirfound++; - // Run llx_mytable.sql files + // Run llx_mytable.sql files, then llx_mytable_*.sql + $files = array(); while (($file = readdir($handle))!==false) + { + $files[] = $file; + } + sort($files); + foreach ($files as $file) { if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data') { @@ -635,8 +641,14 @@ abstract class DolibarrModules rewinddir($handle); - // Run llx_mytable.key.sql files (Must be done after llx_mytable.sql) + // Run llx_mytable.key.sql files (Must be done after llx_mytable.sql) then then llx_mytable_*.key.sql + $files = array(); while (($file = readdir($handle))!==false) + { + $files[] = $file; + } + sort($files); + foreach ($files as $file) { if (preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data') { @@ -648,7 +660,13 @@ abstract class DolibarrModules rewinddir($handle); // Run data_xxx.sql files (Must be done after llx_mytable.key.sql) + $files = array(); while (($file = readdir($handle))!==false) + { + $files[] = $file; + } + sort($files); + foreach ($files as $file) { if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'data') { @@ -660,7 +678,13 @@ abstract class DolibarrModules rewinddir($handle); // Run update_xxx.sql files + $files = array(); while (($file = readdir($handle))!==false) + { + $files[] = $file; + } + sort($files); + foreach ($files as $file) { if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,6) == 'update') { From f2e2edbc64311e744e7d6e11bef519e1e20050af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 Sep 2015 15:10:52 +0200 Subject: [PATCH 4/5] FIX not closing CSS. --- htdocs/theme/eldy/style.css.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a3734e1e1ab..7ecf63b1000 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3669,7 +3669,6 @@ border-top-right-radius: 6px; .public_border { border: 1px solid #888; } -.public_liste_titre { From fe6af7d8eb48290b3475a8bb4afd99898e215d6d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Sep 2015 11:29:26 +0200 Subject: [PATCH 5/5] FIX Description of tags was mandatory in edit mode but not in create mode. Should not be mandatory. --- htdocs/categories/edit.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 362c2b324a1..98160cf9b6d 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -82,20 +82,16 @@ if ($action == 'update' && $user->rights->categorie->creer) if (empty($categorie->label)) { - $action = 'create'; + $error++; + $action = 'edit'; setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors'); } - if (empty($categorie->description)) - { - $action = 'create'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Description")), 'errors'); - } if (empty($categorie->error)) { $ret = $extrafields->setOptionalsFromPost($extralabels,$categorie); if ($ret < 0) $error++; - if ($categorie->update($user) > 0) + if (! $error && $categorie->update($user) > 0) { header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$categorie->id.'&type='.$type); exit; @@ -138,14 +134,14 @@ dol_fiche_head(''); print ''; // Ref -print ''; print ''; // Description print ''; -print ''; +print ''; print '
'; +print '
'; print $langs->trans("Ref").''; print '
'.$langs->trans("Description").''.$langs->trans("Description").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50);