Fix phpcs
This commit is contained in:
parent
15bbba3f52
commit
c9a73cc380
@ -469,7 +469,7 @@ class BonPrelevement extends CommonObject
|
||||
$message = $langs->trans("InfoCreditMessage", $this->ref, dol_print_date($date, 'dayhour'));
|
||||
|
||||
//Add payment of withdrawal into bank
|
||||
$bankaccount = ($this->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||
$bankaccount = ($this->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||
$facs = array();
|
||||
$amounts = array();
|
||||
$amountsperthirdparty = array();
|
||||
@ -2186,7 +2186,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
// Get data of bank account
|
||||
//$id = $configuration->global->PRELEVEMENT_ID_BANKACCOUNT;
|
||||
$id = ($type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||
$id = ($type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||
$account = new Account($this->db);
|
||||
if ($account->fetch($id) > 0)
|
||||
{
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -39,7 +38,7 @@ class RejetPrelevement
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
public $type; //prelevement or bank transfer
|
||||
|
||||
|
||||
@ -95,7 +94,7 @@ class RejetPrelevement
|
||||
$now = dol_now();
|
||||
|
||||
dol_syslog("RejetPrelevement::Create id $id");
|
||||
$bankaccount = ($this->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||
$bankaccount = ($this->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||
$facs = $this->getListInvoices(1);
|
||||
|
||||
$this->db->begin();
|
||||
@ -141,14 +140,14 @@ class RejetPrelevement
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
if($this->type == 'bank-transfer'){
|
||||
$fac = new FactureFournisseur($this->db);
|
||||
$fac = new FactureFournisseur($this->db);
|
||||
$pai = new PaiementFourn($this->db);
|
||||
}
|
||||
else{
|
||||
$fac = new Facture($this->db);
|
||||
$pai = new Paiement($this->db);
|
||||
}
|
||||
|
||||
|
||||
$fac->fetch($facs[$i][0]);
|
||||
|
||||
// Make a negative payment
|
||||
@ -307,7 +306,7 @@ class RejetPrelevement
|
||||
//$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)";
|
||||
if ($this->type == 'bank-transfer') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON (pf.fk_facture_fourn = f.rowid)";
|
||||
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)";
|
||||
|
||||
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_lignes as pl ON (pf.fk_prelevement_lignes = pl.rowid)";
|
||||
$sql .= " WHERE pf.fk_prelevement_lignes = ".$this->id;
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||
|
||||
@ -97,11 +97,11 @@ if ($action == 'confirm_rejet')
|
||||
if ($lipre->fetch($id) == 0)
|
||||
|
||||
{
|
||||
$rej = new RejetPrelevement($db, $user,$type);
|
||||
$rej = new RejetPrelevement($db, $user, $type);
|
||||
|
||||
$rej->create($user, $id, GETPOST('motif', 'alpha'), $daterej, $lipre->bon_rowid, GETPOST('facturer', 'int'));
|
||||
|
||||
header("Location: line.php?id=".$id.'&type='.$type);
|
||||
header("Location: line.php?id=".urlencode($id).'&type='.urlencode($type));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ if ($action == 'confirm_rejet')
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: line.php?id=".$id.'&type='.$type);
|
||||
header("Location: line.php?id=".urlencode($id).'&type='.urlencode($type));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -208,7 +208,7 @@ if ($id)
|
||||
print '<form name="confirm_rejet" method="post" action="line.php?id='.$id.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="confirm_rejet">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -2264,7 +2264,6 @@ class ExpenseReport extends CommonObject
|
||||
$langs->load("trips");
|
||||
|
||||
if (!dol_strlen($modele)) {
|
||||
|
||||
if ($this->modelpdf) {
|
||||
$modele = $this->modelpdf;
|
||||
} elseif (!empty($conf->global->EXPENSEREPORT_ADDON_PDF)) {
|
||||
@ -2278,7 +2277,6 @@ class ExpenseReport extends CommonObject
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user