Fixing style errors.
This commit is contained in:
parent
af82bf2fee
commit
327ec211c4
@ -71,10 +71,10 @@ if ($action == "set")
|
|||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
*/
|
*/
|
||||||
} else $error++;
|
} else $error++;
|
||||||
/* Moved to account
|
/* Moved to account
|
||||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity);
|
||||||
if (!$res > 0) $error++;
|
if (!$res > 0) $error++;
|
||||||
*/
|
*/
|
||||||
if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0)
|
if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0)
|
||||||
{
|
{
|
||||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|||||||
@ -70,14 +70,13 @@ if ($action == "set")
|
|||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
} else $error++;
|
} else $error++;
|
||||||
|
|
||||||
/* Moved to account
|
/* Moved to account
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
|
||||||
if (!$res > 0) $error++;
|
if (!$res > 0) $error++;
|
||||||
*/
|
*/
|
||||||
if (GETPOST("PRELEVEMENT_USER") > 0)
|
if (GETPOST("PRELEVEMENT_USER") > 0)
|
||||||
{
|
{
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|||||||
@ -737,13 +737,13 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if($conf->prelevement->enabled){
|
if ($conf->prelevement->enabled){
|
||||||
print '<tr><td>'.$langs->trans("ICS").'</td>';
|
print '<tr><td>'.$langs->trans("ICS").'</td>';
|
||||||
print '<td>'.$object->ics.'</td>';
|
print '<td>'.$object->ics.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->paymentbybanktransfer->enabled){
|
if ($conf->paymentbybanktransfer->enabled){
|
||||||
print '<tr><td>'.$langs->trans("ICSTransfer").'</td>';
|
print '<tr><td>'.$langs->trans("ICSTransfer").'</td>';
|
||||||
print '<td>'.$object->ics_transfer.'</td>';
|
print '<td>'.$object->ics_transfer.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -1029,12 +1029,12 @@ if ($action == 'create')
|
|||||||
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
||||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.$object->bic.'"></td></tr>';
|
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.$object->bic.'"></td></tr>';
|
||||||
|
|
||||||
if($conf->prelevement->enabled){
|
if ($conf->prelevement->enabled){
|
||||||
print '<tr><td>'.$langs->trans("ICS").'</td>';
|
print '<tr><td>'.$langs->trans("ICS").'</td>';
|
||||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics" value="'.$object->ics.'"></td></tr>';
|
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics" value="'.$object->ics.'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->paymentbybanktransfer->enabled){
|
if ($conf->paymentbybanktransfer->enabled){
|
||||||
print '<tr><td>'.$langs->trans("ICSTransfer").'</td>';
|
print '<tr><td>'.$langs->trans("ICSTransfer").'</td>';
|
||||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.$object->ics_transfer.'"></td></tr>';
|
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.$object->ics_transfer.'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ $type = GETPOST('type', 'aZ09');
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real';
|
$mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real';
|
||||||
$format = GETPOST('format', 'aZ09');
|
$format = GETPOST('format', 'aZ09');
|
||||||
$id_bankaccount = GETPOST ('id_bankaccount','int');
|
$id_bankaccount = GETPOST('id_bankaccount', 'int');
|
||||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||||
@ -80,9 +80,8 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$default_account=($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT');
|
$default_account=($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT');
|
||||||
|
|
||||||
if($id_bankaccount != $conf->global->{$default_account}){
|
if ($id_bankaccount != $conf->global->{$default_account}){
|
||||||
$res = dolibarr_set_const($db, $default_account, $id_bankaccount, 'chaine', 0, '', $conf->entity); //Set as default
|
$res = dolibarr_set_const($db, $default_account, $id_bankaccount, 'chaine', 0, '', $conf->entity); //Set as default
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
@ -207,7 +206,6 @@ print '<form action="'.$_SERVER['PHP_SELF'].'?action=create" method="POST">';
|
|||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||||
if ($nb) {
|
if ($nb) {
|
||||||
|
|
||||||
if ($pricetowithdraw) {
|
if ($pricetowithdraw) {
|
||||||
print $langs->trans('BankToReceiveWithdraw').': ';
|
print $langs->trans('BankToReceiveWithdraw').': ';
|
||||||
$form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT, 'id_bankaccount', 0, "courant=1");
|
$form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT, 'id_bankaccount', 0, "courant=1");
|
||||||
|
|||||||
@ -82,14 +82,14 @@ function prelevement_prepare_head(BonPrelevement $object)
|
|||||||
*
|
*
|
||||||
* @return int -1 if ko 0 if ok
|
* @return int -1 if ko 0 if ok
|
||||||
*/
|
*/
|
||||||
function prelevement_check_config($type='direct-debit')
|
function prelevement_check_config($type = 'direct-debit')
|
||||||
{
|
{
|
||||||
global $conf, $db;
|
global $conf, $db;
|
||||||
if ($type == 'bank-transfer'){
|
if ($type == 'bank-transfer'){
|
||||||
if (empty($conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT)) return -1;
|
if (empty($conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT)) return -1;
|
||||||
//if (empty($conf->global->PRELEVEMENT_ICS)) return -1;
|
//if (empty($conf->global->PRELEVEMENT_ICS)) return -1;
|
||||||
if (empty($conf->global->PAYMENTBYBANKTRANSFER_USER)) return -1;
|
if (empty($conf->global->PAYMENTBYBANKTRANSFER_USER)) return -1;
|
||||||
}else{
|
}else {
|
||||||
if (empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;
|
if (empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;
|
||||||
//if (empty($conf->global->PRELEVEMENT_ICS)) return -1;
|
//if (empty($conf->global->PRELEVEMENT_ICS)) return -1;
|
||||||
if (empty($conf->global->PRELEVEMENT_USER)) return -1;
|
if (empty($conf->global->PRELEVEMENT_USER)) return -1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user