Fixing style errors.
This commit is contained in:
parent
af82bf2fee
commit
327ec211c4
@ -71,10 +71,10 @@ if ($action == "set")
|
||||
if (! $res > 0) $error++;
|
||||
*/
|
||||
} else $error++;
|
||||
/* Moved to account
|
||||
/* Moved to account
|
||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
*/
|
||||
*/
|
||||
if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0)
|
||||
{
|
||||
$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);
|
||||
if (! $res > 0) $error++;
|
||||
*/
|
||||
|
||||
} else $error++;
|
||||
|
||||
/* Moved to account
|
||||
/* Moved to account
|
||||
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
*/
|
||||
*/
|
||||
if (GETPOST("PRELEVEMENT_USER") > 0)
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
@ -94,7 +94,7 @@ if ($action == 'add')
|
||||
|
||||
$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
|
||||
$object->owner_address = trim(GETPOST("owner_address", 'nohtml'));
|
||||
|
||||
|
||||
$object->ics = trim(GETPOST("ics", 'alpha'));
|
||||
$object->ics_transfer = trim(GETPOST("ics_transfer", 'alpha'));
|
||||
|
||||
@ -198,7 +198,7 @@ if ($action == 'update')
|
||||
|
||||
$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
|
||||
$object->owner_address = trim(GETPOST("owner_address", 'nohtml'));
|
||||
|
||||
|
||||
$object->ics = trim(GETPOST("ics", 'alpha'));
|
||||
$object->ics_transfer = trim(GETPOST("ics_transfer", 'alpha'));
|
||||
|
||||
@ -736,14 +736,14 @@ if ($action == 'create')
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
if($conf->prelevement->enabled){
|
||||
|
||||
if ($conf->prelevement->enabled){
|
||||
print '<tr><td>'.$langs->trans("ICS").'</td>';
|
||||
print '<td>'.$object->ics.'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if($conf->paymentbybanktransfer->enabled){
|
||||
|
||||
if ($conf->paymentbybanktransfer->enabled){
|
||||
print '<tr><td>'.$langs->trans("ICSTransfer").'</td>';
|
||||
print '<td>'.$object->ics_transfer.'</td>';
|
||||
print '</tr>';
|
||||
@ -1028,17 +1028,17 @@ if ($action == 'create')
|
||||
|
||||
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>';
|
||||
|
||||
if($conf->prelevement->enabled){
|
||||
|
||||
if ($conf->prelevement->enabled){
|
||||
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>';
|
||||
}
|
||||
|
||||
if($conf->paymentbybanktransfer->enabled){
|
||||
|
||||
if ($conf->paymentbybanktransfer->enabled){
|
||||
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 '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
|
||||
print '<textarea class="flat quatrevingtpercent" name="domiciliation" rows="'.ROWS_2.'">';
|
||||
print $object->domiciliation;
|
||||
|
||||
@ -214,19 +214,19 @@ class Account extends CommonObject
|
||||
* @var int
|
||||
*/
|
||||
public $date_solde;
|
||||
|
||||
|
||||
/**
|
||||
* Creditor Identifier CI. Some banks use different ICS for direct debit and bank tranfer
|
||||
* @var string
|
||||
*/
|
||||
public $ics;
|
||||
|
||||
|
||||
/**
|
||||
* Creditor Identifier for Bank Transfer.
|
||||
* @var string
|
||||
*/
|
||||
public $ics_transfer;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@ -1003,7 +1003,7 @@ class Account extends CommonObject
|
||||
|
||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$this->date_update = $this->db->jdate($obj->date_update);
|
||||
|
||||
|
||||
$this->ics = $obj->ics;
|
||||
$this->ics_transfer = $obj->ics_transfer;
|
||||
|
||||
|
||||
@ -1155,7 +1155,7 @@ class BonPrelevement extends CommonObject
|
||||
$this->emetteur_iban = $account->iban;
|
||||
$this->emetteur_bic = $account->bic;
|
||||
|
||||
$this->emetteur_ics = ($type == 'bank-transfer' ? $account->ics_transfer : $account->ics);
|
||||
$this->emetteur_ics = ($type == 'bank-transfer' ? $account->ics_transfer : $account->ics);
|
||||
|
||||
$this->raison_sociale = $account->proprio;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ $type = GETPOST('type', 'aZ09');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real';
|
||||
$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;
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
@ -79,12 +79,11 @@ if (empty($reshook))
|
||||
if ($action == 'create')
|
||||
{
|
||||
$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
|
||||
|
||||
}
|
||||
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$bank = new Account($db);
|
||||
$bank->fetch($conf->global->{$default_account});
|
||||
@ -93,7 +92,7 @@ if (empty($reshook))
|
||||
header("Location: ".DOL_URL_ROOT.'/compta/prelevement/create.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$delayindays = 0;
|
||||
if ($type != 'bank-transfer') {
|
||||
@ -207,12 +206,11 @@ print '<form action="'.$_SERVER['PHP_SELF'].'?action=create" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
if ($nb) {
|
||||
|
||||
if ($pricetowithdraw) {
|
||||
print $langs->trans('BankToReceiveWithdraw').': ';
|
||||
$form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT, 'id_bankaccount', 0, "courant=1");
|
||||
print ' - ';
|
||||
|
||||
|
||||
print $langs->trans('ExecutionDate').' ';
|
||||
$datere = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||
print $form->selectDate($datere, 're');
|
||||
|
||||
@ -82,14 +82,14 @@ function prelevement_prepare_head(BonPrelevement $object)
|
||||
*
|
||||
* @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;
|
||||
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{
|
||||
}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;
|
||||
|
||||
@ -229,7 +229,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
$posY += 2;
|
||||
$pdf->SetXY($this->marge_gauche, $posY);
|
||||
$ics = '';
|
||||
if (!empty($conf->global->PRELEVEMENT_ICS)) $ics = $conf->global->PRELEVEMENT_ICS;
|
||||
if (!empty($conf->global->PRELEVEMENT_ICS)) $ics = $conf->global->PRELEVEMENT_ICS;
|
||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").') : '.$ics, 0, 'L');
|
||||
|
||||
$posY = $pdf->GetY();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user