forked from Wavyzz/dolibarr
NEW: ICS fields moved into bank account table
This commit is contained in:
@@ -78,13 +78,21 @@ function prelevement_prepare_head(BonPrelevement $object)
|
||||
/**
|
||||
* Check need data to create standigns orders receipt file
|
||||
*
|
||||
* @param string $type 'bank-transfer' or 'direct-debit'
|
||||
*
|
||||
* @return int -1 if ko 0 if ok
|
||||
*/
|
||||
function prelevement_check_config()
|
||||
function prelevement_check_config($type='direct-debit')
|
||||
{
|
||||
global $conf;
|
||||
if (empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;
|
||||
if (empty($conf->global->PRELEVEMENT_ICS)) return -1;
|
||||
if (empty($conf->global->PRELEVEMENT_USER)) return -1;
|
||||
global $conf, $db;
|
||||
if ($type == 'bank-transfer'){
|
||||
if (empty($conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT)) return -1;
|
||||
//if (empty($conf->global->PRELEVEMENT_ICS)) return -1;
|
||||
if (empty($conf->global->PAYMENTBYBANKTRANSFER_USER)) return -1;
|
||||
}else{
|
||||
if (empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;
|
||||
//if (empty($conf->global->PRELEVEMENT_ICS)) return -1;
|
||||
if (empty($conf->global->PRELEVEMENT_USER)) return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user