Clean conflict between direct debit and direct credit orders.
This commit is contained in:
parent
af46108cc4
commit
106fe7bde6
234
htdocs/compta/paymentbybanktransfer/index.php
Normal file
234
htdocs/compta/paymentbybanktransfer/index.php
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2005-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/compta/paymentbybanktransfer/index.php
|
||||||
|
* \ingroup paymentbybanktransfer
|
||||||
|
* \brief Payment by bank transfer index page
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
require '../../main.inc.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('banks', 'categories', 'withdrawals'));
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$socid = GETPOST('socid', 'int');
|
||||||
|
if ($user->socid) $socid = $user->socid;
|
||||||
|
$result = restrictedArea($user, 'paymentbybanktransfer', '', '');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
llxHeader('', $langs->trans("SuppliersStandingOrdersArea"));
|
||||||
|
|
||||||
|
if (prelevement_check_config() < 0)
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Withdraw")), null, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans("SuppliersStandingOrdersArea"));
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
|
$thirdpartystatic = new Societe($db);
|
||||||
|
$invoicestatic = new Facture($db);
|
||||||
|
$bprev = new BonPrelevement($db);
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="noborder centpercent">';
|
||||||
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").'</th></tr>';
|
||||||
|
|
||||||
|
print '<tr class="oddeven"><td>'.$langs->trans("NbOfInvoiceToWithdraw").'</td>';
|
||||||
|
print '<td class="right">';
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/demandes.php?status=0">';
|
||||||
|
print $bprev->NbFactureAPrelever();
|
||||||
|
print '</a>';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr class="oddeven"><td>'.$langs->trans("AmountToWithdraw").'</td>';
|
||||||
|
print '<td class="right">';
|
||||||
|
print price($bprev->SommeAPrelever(), '', '', 1, -1, -1, 'auto');
|
||||||
|
print '</td></tr></table></div><br>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Invoices waiting for withdraw
|
||||||
|
*/
|
||||||
|
$sql = "SELECT f.ref, f.rowid, f.total_ttc, f.fk_statut, f.paye, f.type,";
|
||||||
|
$sql .= " pfd.date_demande, pfd.amount,";
|
||||||
|
$sql .= " s.nom as name, s.rowid as socid";
|
||||||
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f,";
|
||||||
|
$sql .= " ".MAIN_DB_PREFIX."societe as s";
|
||||||
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
|
$sql .= " , ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||||
|
$sql .= " WHERE s.rowid = f.fk_soc";
|
||||||
|
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||||
|
$sql .= " AND f.total_ttc > 0";
|
||||||
|
if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS))
|
||||||
|
{
|
||||||
|
$sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
|
||||||
|
}
|
||||||
|
$sql .= " AND pfd.traite = 0 AND pfd.fk_facture_fourn = f.rowid";
|
||||||
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
|
if ($socid) $sql .= " AND f.fk_soc = ".$socid;
|
||||||
|
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="noborder centpercent">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<th colspan="5">'.$langs->trans("SupplierInvoiceWaitingWithdraw").' ('.$num.')</th></tr>';
|
||||||
|
if ($num)
|
||||||
|
{
|
||||||
|
while ($i < $num && $i < 20)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
$invoicestatic->id = $obj->rowid;
|
||||||
|
$invoicestatic->ref = $obj->ref;
|
||||||
|
$invoicestatic->statut = $obj->fk_statut;
|
||||||
|
$invoicestatic->paye = $obj->paye;
|
||||||
|
$invoicestatic->type = $obj->type;
|
||||||
|
$alreadypayed = $invoicestatic->getSommePaiement();
|
||||||
|
|
||||||
|
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
print $invoicestatic->getNomUrl(1, 'withdraw');
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td>';
|
||||||
|
$thirdpartystatic->id = $obj->socid;
|
||||||
|
$thirdpartystatic->name = $obj->name;
|
||||||
|
print $thirdpartystatic->getNomUrl(1, 'customer');
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td class="right">';
|
||||||
|
print price($obj->amount);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td class="right">';
|
||||||
|
print dol_print_date($db->jdate($obj->date_demande), 'day');
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td class="right">';
|
||||||
|
print $invoicestatic->getLibStatut(3, $alreadypayed);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans("NoSupplierInvoiceToWithdraw", $langs->transnoentitiesnoconv("BankTransfer")).'</td></tr>';
|
||||||
|
}
|
||||||
|
print "</table></div><br>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Withdraw receipts
|
||||||
|
*/
|
||||||
|
$limit = 5;
|
||||||
|
$sql = "SELECT p.rowid, p.ref, p.amount, p.datec, p.statut";
|
||||||
|
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||||
|
$sql .= " ORDER BY datec DESC";
|
||||||
|
$sql .= $db->plimit($limit);
|
||||||
|
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($result);
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
print"\n<!-- debut table -->\n";
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="noborder centpercent">';
|
||||||
|
print '<tr class="liste_titre"><th>'.$langs->trans("LatestBankTransferReceipts", $limit).'</th>';
|
||||||
|
print '<th>'.$langs->trans("Date").'</th>';
|
||||||
|
print '<th class="right">'.$langs->trans("Amount").'</th>';
|
||||||
|
print '<th class="right">'.$langs->trans("Status").'</th>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
while ($i < min($num, $limit))
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
|
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
|
print "<td>";
|
||||||
|
$bprev->id = $obj->rowid;
|
||||||
|
$bprev->ref = $obj->ref;
|
||||||
|
$bprev->statut = $obj->statut;
|
||||||
|
print $bprev->getNomUrl(1);
|
||||||
|
print "</td>\n";
|
||||||
|
print '<td>'.dol_print_date($db->jdate($obj->datec), "dayhour")."</td>\n";
|
||||||
|
print '<td class="right">'.price($obj->amount)."</td>\n";
|
||||||
|
print '<td class="right">'.$bprev->getLibStatut(3)."</td>\n";
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print "</table></div><br>";
|
||||||
|
$db->free($result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
@ -308,8 +308,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
|||||||
// Bank
|
// Bank
|
||||||
$tmpentry = array(
|
$tmpentry = array(
|
||||||
'enabled'=>(!empty($conf->banque->enabled) || !empty($conf->prelevement->enabled)),
|
'enabled'=>(!empty($conf->banque->enabled) || !empty($conf->prelevement->enabled)),
|
||||||
'perms'=>(!empty($user->rights->banque->lire) || !empty($user->rights->prelevement->lire)),
|
'perms'=>(!empty($user->rights->banque->lire) || !empty($user->rights->prelevement->lire) || !empty($user->rights->paymentbybanktransfer->read)),
|
||||||
'module'=>'banque|prelevement'
|
'module'=>'banque|prelevement|paymentbybanktransfer'
|
||||||
);
|
);
|
||||||
$menu_arr[] = array(
|
$menu_arr[] = array(
|
||||||
'name' => 'Bank',
|
'name' => 'Bank',
|
||||||
@ -1464,7 +1464,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("withdrawals", "banks", "bills", "categories"));
|
$langs->loadLangs(array("withdrawals", "banks", "bills", "categories"));
|
||||||
|
|
||||||
// Bank-Caisse
|
// Bank-Cash account
|
||||||
if (!empty($conf->banque->enabled))
|
if (!empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->rights->banque->lire, '', $mainmenu, 'bank');
|
$newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->rights->banque->lire, '', $mainmenu, 'bank');
|
||||||
@ -1484,14 +1484,12 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
$newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->rights->categorie->creer, '', $mainmenu, 'tags');
|
$newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->rights->categorie->creer, '', $mainmenu, 'tags');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prelevements
|
// Direct debit order
|
||||||
if (!empty($conf->prelevement->enabled))
|
if (!empty($conf->prelevement->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("StandingOrders"), 0, $user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw');
|
$newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("StandingOrders"), 0, $user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw');
|
||||||
|
|
||||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") {
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") {
|
||||||
//$newmenu->add("/compta/prelevement/demandes.php?status=0&mainmenu=bank",$langs->trans("StandingOrderToProcess"),1,$user->rights->prelevement->bons->lire);
|
|
||||||
|
|
||||||
$newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->rights->prelevement->bons->creer);
|
$newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->rights->prelevement->bons->creer);
|
||||||
|
|
||||||
$newmenu->add("/compta/prelevement/bons.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->rights->prelevement->bons->lire);
|
$newmenu->add("/compta/prelevement/bons.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->rights->prelevement->bons->lire);
|
||||||
@ -1503,7 +1501,22 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gestion cheques
|
// Bank transfer order
|
||||||
|
if (!empty($conf->paymentbybanktransfer->enabled))
|
||||||
|
{
|
||||||
|
$newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->rights->paymentbybanktransfer->read, '', $mainmenu, 'banktransfer');
|
||||||
|
|
||||||
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "banktransfer") {
|
||||||
|
$newmenu->add("/compta/paymentbybanktransfer/create.php?mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->rights->paymentbybanktransfer->create);
|
||||||
|
|
||||||
|
$newmenu->add("/compta/paymentbybanktransfer/bons.php?mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->rights->paymentbybanktransfer->read);
|
||||||
|
$newmenu->add("/compta/paymentbybanktransfer/list.php?mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->rights->paymentbybanktransfer->read);
|
||||||
|
$newmenu->add("/compta/paymentbybanktransfer/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->rights->paymentbybanktransfer->read);
|
||||||
|
$newmenu->add("/compta/paymentbybanktransfer/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->rights->paymentbybanktransfer->read);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Management of checks
|
||||||
if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && !empty($conf->banque->enabled) && (!empty($conf->facture->enabled) || !empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)))
|
if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && !empty($conf->banque->enabled) && (!empty($conf->facture->enabled) || !empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)))
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->rights->banque->cheque, '', $mainmenu, 'checks');
|
$newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->rights->banque->cheque, '', $mainmenu, 'checks');
|
||||||
|
|||||||
148
htdocs/core/modules/modPaymentByBankTransfer.class.php
Normal file
148
htdocs/core/modules/modPaymentByBankTransfer.class.php
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \defgroup paymentbybanktransfer Module paymentbybanktransfer
|
||||||
|
* \brief Module to manage payment by bank transfer
|
||||||
|
* \file htdocs/core/modules/modPaymentByBankTransfer.class.php
|
||||||
|
* \ingroup paymentbybanktransfer
|
||||||
|
* \brief File to describe and activate the module PaymentByBankTransfer
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to describe and enable module of payment by Bank transfer
|
||||||
|
*/
|
||||||
|
class modPaymentByBankTransfer extends DolibarrModules
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor. Define names, constants, directories, boxes, permissions
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
*/
|
||||||
|
public function __construct($db)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$this->db = $db;
|
||||||
|
$this->numero = 56;
|
||||||
|
|
||||||
|
$this->family = "financial";
|
||||||
|
$this->module_position = '52';
|
||||||
|
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||||
|
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
||||||
|
$this->description = "Management of payment by bank transfer";
|
||||||
|
|
||||||
|
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||||
|
$this->version = 'development';
|
||||||
|
|
||||||
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||||
|
// Name of png file (without png) used for this module
|
||||||
|
$this->picto = 'payment';
|
||||||
|
|
||||||
|
// Data directories to create when module is enabled
|
||||||
|
$this->dirs = array("/paymentbybanktransfer/temp", "/paymentbybanktransfer/receipts");
|
||||||
|
|
||||||
|
// Dependencies
|
||||||
|
$this->hidden = false; // A condition to hide module
|
||||||
|
$this->depends = array("modFournisseur", "modBanque"); // List of module class names as string that must be enabled if this module is enabled
|
||||||
|
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||||
|
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||||
|
$this->phpmin = array(5, 4); // Minimum version of PHP required by module
|
||||||
|
|
||||||
|
// Config pages
|
||||||
|
$this->config_page_url = array("paymentbybanktransfer.php");
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
$this->const = array();
|
||||||
|
$r = 0;
|
||||||
|
|
||||||
|
/*$this->const[$r][0] = "BANK_ADDON_PDF";
|
||||||
|
$this->const[$r][1] = "chaine";
|
||||||
|
$this->const[$r][2] = "sepamandate";
|
||||||
|
$this->const[$r][3] = 'Name of manager to generate SEPA mandate';
|
||||||
|
$this->const[$r][4] = 0;
|
||||||
|
$r++;*/
|
||||||
|
|
||||||
|
|
||||||
|
// Boxes
|
||||||
|
$this->boxes = array();
|
||||||
|
|
||||||
|
// Permissions
|
||||||
|
$this->rights = array();
|
||||||
|
$this->rights_class = 'paymentbybanktransfer';
|
||||||
|
$r = 0;
|
||||||
|
$r++;
|
||||||
|
$this->rights[$r][0] = 561;
|
||||||
|
$this->rights[$r][1] = 'Read bank transfer payment orders';
|
||||||
|
$this->rights[$r][2] = 'r';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'read';
|
||||||
|
|
||||||
|
$r++;
|
||||||
|
$this->rights[$r][0] = 562;
|
||||||
|
$this->rights[$r][1] = 'Create/modify a bank transfer payment order';
|
||||||
|
$this->rights[$r][2] = 'w';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'create';
|
||||||
|
|
||||||
|
$r++;
|
||||||
|
$this->rights[$r][0] = 563;
|
||||||
|
$this->rights[$r][1] = 'Send/Transmit bank transfer payment order';
|
||||||
|
$this->rights[$r][2] = 'a';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'send';
|
||||||
|
|
||||||
|
$r++;
|
||||||
|
$this->rights[$r][0] = 564;
|
||||||
|
$this->rights[$r][1] = 'Record Debits/Rejects of bank transfer payment order';
|
||||||
|
$this->rights[$r][2] = 'a';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'debit';
|
||||||
|
|
||||||
|
// Menus
|
||||||
|
//-------
|
||||||
|
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
public function init($options = '')
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
// Permissions
|
||||||
|
$this->remove($options);
|
||||||
|
|
||||||
|
$sql = array();
|
||||||
|
|
||||||
|
return $this->_init($sql, $options);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -20,17 +20,17 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \defgroup prelevement Module prelevement
|
* \defgroup prelevement Module prelevement
|
||||||
* \brief Module de gestion des prelevements bancaires
|
* \brief Module to manage Direct debit orders
|
||||||
* \file htdocs/core/modules/modPrelevement.class.php
|
* \file htdocs/core/modules/modPrelevement.class.php
|
||||||
* \ingroup prelevement
|
* \ingroup prelevement
|
||||||
* \brief Fichier de description et activation du module Prelevement
|
* \brief File to describe and enable the module Prelevement
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to describe and enable module Prelevement
|
* Class to describe and enable module of payment by Direct Debit
|
||||||
*/
|
*/
|
||||||
class modPrelevement extends DolibarrModules
|
class modPrelevement extends DolibarrModules
|
||||||
{
|
{
|
||||||
@ -51,7 +51,7 @@ class modPrelevement extends DolibarrModules
|
|||||||
$this->module_position = '52';
|
$this->module_position = '52';
|
||||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||||
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
||||||
$this->description = "Gestion des Prelevements";
|
$this->description = "Management of Direct Debit orders";
|
||||||
|
|
||||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||||
$this->version = 'dolibarr';
|
$this->version = 'dolibarr';
|
||||||
@ -124,15 +124,6 @@ class modPrelevement extends DolibarrModules
|
|||||||
$this->rights[$r][4] = 'bons';
|
$this->rights[$r][4] = 'bons';
|
||||||
$this->rights[$r][5] = 'credit';
|
$this->rights[$r][5] = 'credit';
|
||||||
|
|
||||||
/*
|
|
||||||
$this->rights[2][0] = 154;
|
|
||||||
$this->rights[2][1] = 'Setup withdraw account';
|
|
||||||
$this->rights[2][2] = 'w';
|
|
||||||
$this->rights[2][3] = 0;
|
|
||||||
$this->rights[2][4] = 'bons';
|
|
||||||
$this->rights[2][5] = 'configurer';
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
//-------
|
//-------
|
||||||
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
|
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
|
||||||
|
|||||||
@ -541,8 +541,8 @@ Module54Name=Contracts/Subscriptions
|
|||||||
Module54Desc=Management of contracts (services or recurring subscriptions)
|
Module54Desc=Management of contracts (services or recurring subscriptions)
|
||||||
Module55Name=Barcodes
|
Module55Name=Barcodes
|
||||||
Module55Desc=Barcode management
|
Module55Desc=Barcode management
|
||||||
Module56Name=Telephony
|
Module56Name=Payment by bank transfer
|
||||||
Module56Desc=Telephony integration
|
Module56Desc=Management of payment by bank transfer orders. It includes generation of SEPA file for European countries.
|
||||||
Module57Name=Bank Direct Debit payments
|
Module57Name=Bank Direct Debit payments
|
||||||
Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries.
|
Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries.
|
||||||
Module58Name=ClickToDial
|
Module58Name=ClickToDial
|
||||||
|
|||||||
@ -37,6 +37,8 @@ IbanValid=BAN valid
|
|||||||
IbanNotValid=BAN not valid
|
IbanNotValid=BAN not valid
|
||||||
StandingOrders=Direct Debit orders
|
StandingOrders=Direct Debit orders
|
||||||
StandingOrder=Direct debit order
|
StandingOrder=Direct debit order
|
||||||
|
PaymentByBankTransfers=Payments by bank transfer
|
||||||
|
PaymentByBankTransfer=Payment by bank transfer
|
||||||
AccountStatement=Account statement
|
AccountStatement=Account statement
|
||||||
AccountStatementShort=Statement
|
AccountStatementShort=Statement
|
||||||
AccountStatements=Account statements
|
AccountStatements=Account statements
|
||||||
|
|||||||
@ -243,6 +243,8 @@ SendBillRef=Submission of invoice %s
|
|||||||
SendReminderBillRef=Submission of invoice %s (reminder)
|
SendReminderBillRef=Submission of invoice %s (reminder)
|
||||||
StandingOrders=Direct debit orders
|
StandingOrders=Direct debit orders
|
||||||
StandingOrder=Direct debit order
|
StandingOrder=Direct debit order
|
||||||
|
PaymentByBankTransfers=Payments by bank transfer
|
||||||
|
PaymentByBankTransfer=Payment by bank transfer
|
||||||
NoDraftBills=No draft invoices
|
NoDraftBills=No draft invoices
|
||||||
NoOtherDraftBills=No other draft invoices
|
NoOtherDraftBills=No other draft invoices
|
||||||
NoDraftInvoices=No draft invoices
|
NoDraftInvoices=No draft invoices
|
||||||
|
|||||||
@ -27,7 +27,7 @@ DangerZone=Danger zone
|
|||||||
BuildPackage=Build package
|
BuildPackage=Build package
|
||||||
BuildPackageDesc=You can generate a zip package of your application so your are ready to distribute it on any Dolibarr. You can also distribute it or sell it on marketplace like <a href="https://www.dolistore.com">DoliStore.com</a>.
|
BuildPackageDesc=You can generate a zip package of your application so your are ready to distribute it on any Dolibarr. You can also distribute it or sell it on marketplace like <a href="https://www.dolistore.com">DoliStore.com</a>.
|
||||||
BuildDocumentation=Build documentation
|
BuildDocumentation=Build documentation
|
||||||
ModuleIsNotActive=This module is not activated yet. Go to %s to make it live or click here:
|
ModuleIsNotActive=This module is not activated yet. Go to %s to make it live or click here
|
||||||
ModuleIsLive=This module has been activated. Any change may break a current live feature.
|
ModuleIsLive=This module has been activated. Any change may break a current live feature.
|
||||||
DescriptionLong=Long description
|
DescriptionLong=Long description
|
||||||
EditorName=Name of editor
|
EditorName=Name of editor
|
||||||
|
|||||||
@ -4,9 +4,13 @@ SuppliersStandingOrdersArea=Direct credit payment orders area
|
|||||||
StandingOrdersPayment=Direct debit payment orders
|
StandingOrdersPayment=Direct debit payment orders
|
||||||
StandingOrderPayment=Direct debit payment order
|
StandingOrderPayment=Direct debit payment order
|
||||||
NewStandingOrder=New direct debit order
|
NewStandingOrder=New direct debit order
|
||||||
|
NewPaymentByBankTransfer=New payment by bank transfer
|
||||||
StandingOrderToProcess=To process
|
StandingOrderToProcess=To process
|
||||||
|
PaymentByBankTransferReceipts=Bank transfer orders
|
||||||
|
PaymentByBankTransferLines=Bank transfer order lines
|
||||||
WithdrawalsReceipts=Direct debit orders
|
WithdrawalsReceipts=Direct debit orders
|
||||||
WithdrawalReceipt=Direct debit order
|
WithdrawalReceipt=Direct debit order
|
||||||
|
LatestBankTransferReceipts=Latest %s bank transfer orders
|
||||||
LastWithdrawalReceipts=Latest %s direct debit files
|
LastWithdrawalReceipts=Latest %s direct debit files
|
||||||
WithdrawalsLines=Direct debit order lines
|
WithdrawalsLines=Direct debit order lines
|
||||||
RequestStandingOrderToTreat=Request for direct debit payment order to process
|
RequestStandingOrderToTreat=Request for direct debit payment order to process
|
||||||
@ -14,10 +18,12 @@ RequestStandingOrderTreated=Request for direct debit payment order processed
|
|||||||
NotPossibleForThisStatusOfWithdrawReceiptORLine=Not yet possible. Withdraw status must be set to 'credited' before declaring reject on specific lines.
|
NotPossibleForThisStatusOfWithdrawReceiptORLine=Not yet possible. Withdraw status must be set to 'credited' before declaring reject on specific lines.
|
||||||
NbOfInvoiceToWithdraw=No. of qualified invoice with waiting direct debit order
|
NbOfInvoiceToWithdraw=No. of qualified invoice with waiting direct debit order
|
||||||
NbOfInvoiceToWithdrawWithInfo=No. of customer invoice with direct debit payment orders having defined bank account information
|
NbOfInvoiceToWithdrawWithInfo=No. of customer invoice with direct debit payment orders having defined bank account information
|
||||||
|
SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by bank transfer
|
||||||
InvoiceWaitingWithdraw=Invoice waiting for direct debit
|
InvoiceWaitingWithdraw=Invoice waiting for direct debit
|
||||||
AmountToWithdraw=Amount to withdraw
|
AmountToWithdraw=Amount to withdraw
|
||||||
WithdrawsRefused=Direct debit refused
|
WithdrawsRefused=Direct debit refused
|
||||||
NoInvoiceToWithdraw=No customer invoice with open 'Direct debit requests' is waiting. Go on tab '%s' on invoice card to make a request.
|
NoInvoiceToWithdraw=No customer invoice with open 'Direct debit requests' is waiting. Go on tab '%s' on invoice card to make a request.
|
||||||
|
NoSupplierInvoiceToWithdraw=No supplier invoice with open 'Direct credit requests' is waiting. Go on tab '%s' on invoice card to make a request.
|
||||||
ResponsibleUser=User Responsible
|
ResponsibleUser=User Responsible
|
||||||
WithdrawalsSetup=Direct debit payment setup
|
WithdrawalsSetup=Direct debit payment setup
|
||||||
WithdrawStatistics=Direct debit payment statistics
|
WithdrawStatistics=Direct debit payment statistics
|
||||||
|
|||||||
@ -6393,7 +6393,6 @@ div.tabsElem a.tab {
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
.badge {
|
.badge {
|
||||||
line-height: 1.2em;
|
|
||||||
min-width: auto;
|
min-width: auto;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2207,17 +2207,24 @@ if (!GETPOST('hide_websitemenu'))
|
|||||||
|
|
||||||
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">';
|
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">';
|
||||||
|
|
||||||
|
$importlabel = $langs->trans("ImportSite");
|
||||||
|
$exportlabel = $langs->trans("ExportSite");
|
||||||
|
if (! empty($conf->dol_optimize_smallscreen)) {
|
||||||
|
$importlabel = $langs->trans("Import");
|
||||||
|
$exportlabel = $langs->trans("Export");
|
||||||
|
}
|
||||||
|
|
||||||
if ($atleastonepage)
|
if ($atleastonepage)
|
||||||
{
|
{
|
||||||
print '<input type="submit" class="button bordertransp" disabled="disabled" value="'.dol_escape_htmltag($langs->trans("ImportSite")).'" name="importsite">';
|
print '<input type="submit" class="button bordertransp" disabled="disabled" value="'.dol_escape_htmltag($importlabel).'" name="importsite">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("ImportSite")).'" name="importsite">';
|
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($importlabel).'" name="importsite">';
|
||||||
}
|
}
|
||||||
|
|
||||||
//print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditMenu")).'" name="editmenu">';
|
//print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditMenu")).'" name="editmenu">';
|
||||||
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("ExportSite")).'" name="exportsite">';
|
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($exportlabel).'" name="exportsite">';
|
||||||
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("CloneSite")).'" name="createfromclone">';
|
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("CloneSite")).'" name="createfromclone">';
|
||||||
|
|
||||||
print '<input type="submit" class="buttonDelete bordertransp" name="deletesite" value="'.$langs->trans("Delete").'"'.($atleastonepage ? ' disabled="disabled"' : '').'>';
|
print '<input type="submit" class="buttonDelete bordertransp" name="deletesite" value="'.$langs->trans("Delete").'"'.($atleastonepage ? ' disabled="disabled"' : '').'>';
|
||||||
@ -2261,7 +2268,7 @@ if (!GETPOST('hide_websitemenu'))
|
|||||||
|
|
||||||
print '<span class="websiteinputurl valignmiddle" id="websiteinputurl">';
|
print '<span class="websiteinputurl valignmiddle" id="websiteinputurl">';
|
||||||
$linktotestonwebserver = '<a href="'.($virtualurl ? $virtualurl : '#').'" class="valignmiddle">';
|
$linktotestonwebserver = '<a href="'.($virtualurl ? $virtualurl : '#').'" class="valignmiddle">';
|
||||||
$linktotestonwebserver .= $langs->trans("TestDeployOnWeb", $virtualurl).' '.img_picto('', 'globe');
|
$linktotestonwebserver .= '<span class="hideonsmartphone">'.$langs->trans("TestDeployOnWeb", $virtualurl).' </span>'.img_picto('', 'globe');
|
||||||
$linktotestonwebserver .= '</a>';
|
$linktotestonwebserver .= '</a>';
|
||||||
$htmltext = '';
|
$htmltext = '';
|
||||||
if (empty($object->fk_default_home))
|
if (empty($object->fk_default_home))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user