Skip to content

Commit

Permalink
Add customer accountancy code on deposit slips export
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Jul 7, 2018
1 parent e9b4141 commit 655d55e
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions htdocs/core/modules/modBanque.class.php
Expand Up @@ -63,9 +63,9 @@ function __construct($db)
// Data directories to create when module is enabled
$this->dirs = array("/banque/temp");

// Config pages
//-------------
$this->config_page_url = array("bank.php");
// Config pages
//-------------
$this->config_page_url = array("bank.php");

// Dependancies
$this->depends = array();
Expand Down Expand Up @@ -160,11 +160,11 @@ function __construct($db)
'b.datec'=>"account","bu.url_id"=>"company","s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company"
);
$this->export_special_array[$r]=array('-b.amount'=>'NULLIFNEG','b.amount'=>'NULLIFNEG');
if (empty($conf->fournisseur->enabled))
{
unset($this->export_fields_array[$r]['s.code_compta_fournisseur']);
unset($this->export_entities_array[$r]['s.code_compta_fournisseur']);
}
if (empty($conf->fournisseur->enabled))
{
unset($this->export_fields_array[$r]['s.code_compta_fournisseur']);
unset($this->export_entities_array[$r]['s.code_compta_fournisseur']);
}
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'bank_account as ba, '.MAIN_DB_PREFIX.'bank as b)';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."bank_url as bu ON (bu.fk_bank = b.rowid AND bu.type = 'company')";
Expand All @@ -178,10 +178,10 @@ function __construct($db)
$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.ref"=>"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"
"bch.date_bordereau"=>"Date","bch.amount"=>"Total","bch.nbcheque"=>"NbCheque","bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","s.code_compta"=>"CustomerAccountancyCode","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",
"bch.date_bordereau"=>"Date","bch.rowid"=>"Numeric","bch.ref"=>"Numeric","bch.ref_ext"=>"Text","bch.amount"=>"Numeric","bch.nbcheque"=>"Numeric","bu.url_id"=>"Text","s.nom"=>"Text","f.facnumber"=>"Text"
"bch.date_bordereau"=>"Date","bch.rowid"=>"Numeric","bch.ref"=>"Numeric","bch.ref_ext"=>"Text","bch.amount"=>"Numeric","bch.nbcheque"=>"Numeric","bu.url_id"=>"Text","s.nom"=>"Text","s.code_compta"=>"Text","f.facnumber"=>"Text"
);
$this->export_entities_array[$r]=array('ba.ref'=>'account','ba.label'=>'account','b.datev'=>'account','b.num_chq'=>'account','b.amount'=>'account','b.num_releve'=>'account','b.datec'=>"account",
"bu.url_id"=>"company","s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company","f.facnumber"=>"invoice");
Expand All @@ -203,12 +203,12 @@ function __construct($db)
}


/**
* Function called when module is enabled.
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
* It also creates data directories.
*
* @param string $options Options when enabling module ('', 'noboxes')
/**
* Function called when module is enabled.
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
* It also creates data directories.
*
* @param string $options Options when enabling module ('', 'noboxes')
* @return int 1 if OK, 0 if KO
*/
function init($options='')
Expand Down

0 comments on commit 655d55e

Please sign in to comment.