diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index ef5596d9815..434b8ace7e5 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -524,8 +524,8 @@ if ($mode == 'common' || $mode == 'commonkanban') $moreforfilter .= ''; $moreforfilter .= '
'; - $moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition')); - $moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition')); + $moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'common' ? '' : ' btnTitleSelected'))); + $moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'commonkanban' ? '' : ' btnTitleSelected'))); $moreforfilter .= '
'; $moreforfilter .= '
'.$moreinfo.'
'; @@ -635,7 +635,8 @@ if ($mode == 'common' || $mode == 'commonkanban') } $familytext = empty($familyinfo[$familykey]['label']) ? $familykey : $familyinfo[$familykey]['label']; - print load_fiche_titre($familytext, '', ''); + + print load_fiche_titre($familytext, '', '', 0, '', 'modulefamilygroup'); if ($mode == 'commonkanban') { print '
'; diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 0f8c3763228..994bf13c031 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -88,7 +88,7 @@ function printDropdownBookmarksList() $i = 0; while ((empty($conf->global->BOOKMARKS_SHOW_IN_MENU) || $i < $conf->global->BOOKMARKS_SHOW_IN_MENU) && $obj = $db->fetch_object($resql)) { - $bookmarkList .= 'target == 1 ? ' target="_blank"' : '').' href="'.dol_escape_htmltag($obj->url).'" >'; + $bookmarkList .= 'target == 1 ? ' target="_blank"' : '').' href="'.dol_escape_htmltag($obj->url).'" >'; $bookmarkList .= dol_escape_htmltag($obj->title); $bookmarkList .= ''; $i++; diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php index 63769e2bd9e..27c554cbd99 100644 --- a/htdocs/compta/paymentbybanktransfer/index.php +++ b/htdocs/compta/paymentbybanktransfer/index.php @@ -28,7 +28,7 @@ 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.'/fourn/class/fournisseur.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'; @@ -75,9 +75,9 @@ print '
'; print ''; print ''; -print ''; +print ''; print ''; @@ -100,11 +100,11 @@ $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.entity IN (".getEntity('supplier_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 f.fk_statut = ".FactureFournisseur::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; @@ -173,9 +173,11 @@ print '
'; /* * 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 .= " WHERE p.type = 'bank-transfer'"; $sql .= " ORDER BY datec DESC"; $sql .= $db->plimit($limit); @@ -194,26 +196,30 @@ if ($result) print '
'; print ''; - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($result); + if ($num > 0) { + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($result); + print ''; - print ''; + print "\n"; + print '\n"; + print '\n"; + print '\n"; - print "\n"; - print '\n"; - print '\n"; - print '\n"; - - print "\n"; - $i++; + print "\n"; + $i++; + } + } else { + print ''; } + print "
'.$langs->trans("Statistics").'
'.$langs->trans("NbOfInvoiceToWithdraw").'
'.$langs->trans("NbOfInvoiceToPayByBankTransfer").''; -print ''; +print ''; print $bprev->NbFactureAPrelever(); print ''; print '
'.$langs->trans("Status").'
"; + $bprev->id = $obj->rowid; + $bprev->ref = $obj->ref; + $bprev->statut = $obj->statut; + print $bprev->getNomUrl(1); + print "'.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3).""; - $bprev->id = $obj->rowid; - $bprev->ref = $obj->ref; - $bprev->statut = $obj->statut; - print $bprev->getNomUrl(1); - print "'.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3)."
'.$langs->trans("None").'

"; $db->free($result); } else { diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 347b3ebb37f..a8c14cbc124 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -38,6 +38,8 @@ $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); @@ -57,6 +59,11 @@ $search_amount = GETPOST('search_amount', 'alpha'); $bon = new BonPrelevement($db); $hookmanager->initHooks(array('withdrawalsreceiptslist')); +$usercancreate = $user->rights->prelevement->bons->creer; +if ($type == 'bank-transfer') { + $usercancreate = $user->rights->paymentbybanktransfer->create; +} + /* * Actions @@ -78,6 +85,11 @@ llxHeader('', $langs->trans("WithdrawalsReceipts")); $sql = "SELECT p.rowid, p.ref, p.amount, p.statut, p.datec"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; +if ($type == 'bank-transfer') { + $sql .= " AND p.type = 'bank-transfer'"; +} else { + $sql .= " AND p.type = 'debit-order'"; +} if ($search_ref) $sql .= natural_search("p.ref", $search_ref); if ($search_amount) $sql .= natural_search("p.amount", $search_amount, 1); @@ -112,7 +124,7 @@ if ($result) $selectedfields = ''; $newcardbutton = ''; - if ($user->rights->prelevement->bons->creer) + if ($usercancreate) { $newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php'); } @@ -127,7 +139,14 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1); + $titlekey = "WithdrawalsReceipts"; + $title = $langs->trans("WithdrawalsReceipts"); + if ($type == 'bank-transfer') { + $titlekey = "BankTransferReceipts"; + $title = $langs->trans("BankTransferReceipts"); + } + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1); $moreforfilter = ''; @@ -146,7 +165,7 @@ if ($result) print ''; print ''; - print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); + print_liste_field_titre($titlekey, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 7d56cec823e..3a6fed68113 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -45,6 +45,8 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); +$type = GETPOST('type', 'aZ09'); + // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 6192d97d92f..1bb65bc180c 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -600,8 +600,7 @@ class BonPrelevement extends CommonObject $arr = array(); /* - * Returns all invoices presented - * within a withdrawal receipt + * Returns all invoices presented within same order */ $sql = "SELECT fk_facture"; if ($amounts) $sql .= ", SUM(pl.amount)"; @@ -1094,8 +1093,12 @@ class BonPrelevement extends CommonObject if (!$notrigger) { + $triggername = 'DIRECT_DEBIT_ORDER_DELETE'; + if ($this->type == 'bank-transfer') { + $triggername = 'PAYMENTBYBANKTRANFER_DELETE'; + } // Call trigger - $result = $this->call_trigger('DIRECT_DEBIT_ORDER_DELETE', $user); + $result = $this->call_trigger($triggername, $user); if ($result < 0) $error++; // End call triggers } @@ -1157,7 +1160,12 @@ class BonPrelevement extends CommonObject $result = ''; - $label = ''.$langs->trans("ShowWithdraw").''; + $labeltoshow = 'Withdraw'; + if ($this->type == 'bank-transfer') { + $labeltoshow = 'PaymentByBankTransfer'; + } + + $label = ''.$langs->trans($labeltoshow).''; $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; if (isset($this->statut)) { @@ -1165,6 +1173,9 @@ class BonPrelevement extends CommonObject } $url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id; + if ($this->type == 'bank-transfer') { + $url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/card.php?id='.$this->id; + } if ($option != 'nolink') { @@ -1204,7 +1215,7 @@ class BonPrelevement extends CommonObject //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); global $action, $hookmanager; - $hookmanager->initHooks(array('myobjectdao')); + $hookmanager->initHooks(array('banktransferdao')); $parameters = array('id'=>$this->id, 'getnomurl'=>$result); $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $result = $hookmanager->resPrint; diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 015380a669d..d1ef9b7c9e2 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -43,6 +43,8 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies', 'bill if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + // Get supervariables $action = GETPOST('action', 'alpha'); $mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real'; @@ -127,7 +129,12 @@ $h++; dol_fiche_head($head, $hselected, $langs->trans("StandingOrders"), 0, 'payment'); */ -print load_fiche_titre($langs->trans("NewStandingOrder")); +$title = $langs->trans("NewStandingOrder"); +if ($type == 'bank-transfer') { + $title = $langs->trans("NewPaymentByBankTransfer"); +} + +print load_fiche_titre($title); dol_fiche_head(); @@ -141,12 +148,17 @@ if ($nb < 0 || $nb1 < 0 || $nb11 < 0) } print ''; -print ''; +$title = $langs->trans("NbOfInvoiceToWithdraw"); +if ($type == 'bank-transfer') { + $title = $langs->trans("NbOfInvoiceToPayByBankTransfer"); +} + +print ''; print ''; -print ''; +print ''; print ''; @@ -157,7 +169,7 @@ print ''; if ($mesg) print $mesg; -print "
\n"; +print '
'."\n"; print '
'; print ''; @@ -177,7 +189,11 @@ if ($nb) { print ''.$langs->trans("CreateForSepaFRST")."\n"; print ''.$langs->trans("CreateForSepaRCUR")."\n"; } else { - print ''.$langs->trans("CreateAll")."\n"; + $title = $langs->trans("CreateAll"); + if ($type == 'bank-transfer') { + $title = $langs->trans("CreateFileForPaymentByBankTransfer"); + } + print ''.$title."\n"; } } } else { @@ -197,7 +213,11 @@ print '
'; $sql = "SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,"; $sql .= " pfd.date_demande, pfd.amount"; -$sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +if ($type == 'bank-transfer') { + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,"; +} else { + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +} $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE s.rowid = f.fk_soc"; @@ -208,7 +228,11 @@ if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) } $sql .= " AND f.total_ttc > 0"; $sql .= " AND pfd.traite = 0"; -$sql .= " AND pfd.fk_facture = f.rowid"; +if ($type == 'bank-transfer') { + $sql .= " AND pfd.fk_facture = f.rowid"; +} else { + $sql .= " AND pfd.fk_facture_fourn = f.rowid"; +} if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid; $nbtotalofrecords = ''; @@ -243,7 +267,11 @@ if ($resql) print ''; } - print_barre_liste($langs->trans("InvoiceWaitingWithdraw"), $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); + $title = $langs->trans("InvoiceWaitingWithdraw"); + if ($type == 'bank-transfer') { + $title = $langs->trans("InvoiceWaitingPaymentByBankTransfer"); + } + print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); print '
'.$langs->trans("NbOfInvoiceToWithdraw").'
'.$title.''; print $nb; print '
'.$langs->trans("AmountToWithdraw").'
'.$langs->trans("AmountTotal").''; print price($pricetowithdraw); print '
'; print ''; diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 30618de8c24..309a739a697 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -21,12 +21,13 @@ /** * \file htdocs/compta/prelevement/demandes.php * \ingroup prelevement - * \brief Page to list withdraw requests + * \brief Page to list bank transfer requests (debit order or payments of vendors) */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/modPrelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -43,6 +44,8 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myo $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$type = GETPOST('type', 'aZ09'); + $search_facture = GETPOST('search_facture', 'alpha'); $search_societe = trim(GETPOST('search_societe', 'alpha')); @@ -85,11 +88,18 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' * View */ -if (!$status) -{ - $title = $langs->trans("RequestStandingOrderToTreat"); +if ($type != 'bank-transfer') { + if (!$status) { + $title = $langs->trans("RequestStandingOrderToTreat"); + } else { + $title = $langs->trans("RequestStandingOrderTreated"); + } } else { - $title = $langs->trans("RequestStandingOrderTreated"); + if (!$status) { + $title = $langs->trans("RequestPaymentsByBankTransferToTreat"); + } else { + $title = $langs->trans("RequestPaymentsByBankTransferTreated"); + } } llxHeader('', $title); @@ -103,7 +113,11 @@ $sql = "SELECT f.ref, f.rowid, f.total_ttc,"; $sql .= " s.nom as name, s.rowid as socid,"; $sql .= " pfd.date_demande as date_demande,"; $sql .= " pfd.fk_user_demande"; -$sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +if ($type != 'bank-transfer') { + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +} else { + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,"; +} $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -118,7 +132,11 @@ if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } -$sql .= " AND pfd.fk_facture = f.rowid"; +if ($type != 'bank-transfer') { + $sql .= " AND pfd.fk_facture = f.rowid"; +} else { + $sql .= " AND pfd.fk_facture_fourn = f.rowid"; +} if ($search_facture) $sql .= natural_search("f.ref", $search_facture); if ($search_societe) $sql .= natural_search("s.nom", $search_societe); $sql .= $db->order($sortfield, $sortorder); @@ -156,6 +174,9 @@ if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) $newcardbutton = ''.$langs->trans("Back").''; +if ($type == 'bank-transfer') { + $newcardbutton = ''.$langs->trans("Back").''; +} print ''; if ($optioncss != '') print ''; @@ -167,6 +188,8 @@ print ''; print ''; print ''; +$param = ''; + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); print '
'; @@ -191,8 +214,6 @@ print $searchpicto; print ''; print ''; -$users = array(); - $i = 0; while ($i < min($num, $limit)) { diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index c0fa4f55e68..b9cd1232690 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -42,6 +42,8 @@ $prev_id = GETPOST('id', 'int'); $socid = GETPOST('socid', 'int'); $ref = GETPOST('ref', 'alpha'); +$type = GETPOST('type', 'aZ09'); + $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 65116878bb9..b8665e822cf 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -41,6 +41,8 @@ if ($user->socid > 0) accessforbidden(); $prev_id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); +$type = GETPOST('type', 'aZ09'); + // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 0ada15853d9..0b1d9744b20 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -39,6 +39,8 @@ if ($user->socid > 0) accessforbidden(); $prev_id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); +$type = GETPOST('type', 'aZ09'); + // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index d182176f0fa..3cd8758b942 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -176,6 +176,7 @@ print '
'; $limit = 5; $sql = "SELECT p.rowid, p.ref, p.amount, p.datec, p.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; +$sql .= " WHERE p.type = 'debit-order'"; $sql .= " ORDER BY datec DESC"; $sql .= $db->plimit($limit); @@ -194,26 +195,31 @@ if ($result) print '
'; print ''; - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($result); + if ($num > 0) { + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($result); - print ''; + print ''; - print "\n"; - print '\n"; - print '\n"; - print '\n"; + print "\n"; + print '\n"; + print '\n"; + print '\n"; - print "\n"; - $i++; + print "\n"; + $i++; + } + } else { + print ''; } + print "
'.$langs->trans("Status").'
"; - $bprev->id = $obj->rowid; - $bprev->ref = $obj->ref; - $bprev->statut = $obj->statut; - print $bprev->getNomUrl(1); - print "'.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3).""; + $bprev->id = $obj->rowid; + $bprev->ref = $obj->ref; + $bprev->statut = $obj->statut; + print $bprev->getNomUrl(1); + print "'.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3)."
'.$langs->trans("None").'

"; $db->free($result); } else { diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index fd77d6d90f6..52e62f51006 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -43,6 +43,8 @@ $action = GETPOST('action', 'alpha'); $id = GETPOST('id', 'int'); $socid = GETPOST('socid', 'int'); +$type = GETPOST('type', 'aZ09'); + $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortorder = GETPOST('sortorder', 'alpha'); $sortfield = GETPOST('sortfield', 'alpha'); diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 3130aa475f6..dab050e3eaa 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -47,6 +47,8 @@ $socid = GETPOST('socid', 'int'); if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 61417a2cd5f..5701bb6cd1c 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -38,6 +38,8 @@ $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + // Get supervariables $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortorder = GETPOST('sortorder', 'alpha'); @@ -47,6 +49,8 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + + /* * View */ diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index b12a6a2bb35..a113766bbd0 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -36,6 +36,8 @@ $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + /* * View diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 2a5bb0acbca..092ef6795cb 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3664,7 +3664,7 @@ class Form $sql = 'SELECT rowid, ref, situation_cycle_ref, situation_counter, situation_final, fk_soc'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture'; $sql .= ' WHERE entity IN ('.getEntity('invoice').')'; - $sql .= ' AND situation_counter>=1'; + $sql .= ' AND situation_counter >= 1'; $sql .= ' AND fk_soc = '.(int) $socid; $sql .= ' AND type <> 2'; $sql .= ' ORDER by situation_cycle_ref, situation_counter desc'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index cff642b20a7..7499a0a9b67 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1187,7 +1187,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab $out = "\n".''; if ((!empty($title) && $showtitle) || $morehtmlright || !empty($links)) { - $out .= '
'."\n"; + $out .= '
'."\n"; } // Show right part diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 9f9acd0655e..5127fb6dfa5 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1489,8 +1489,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->rights->prelevement->bons->lire); $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->rights->prelevement->bons->lire); $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->rights->prelevement->bons->lire); - - //$newmenu->add("/compta/prelevement/config.php",$langs->trans("Setup"),1,$user->rights->prelevement->bons->configurer); } } @@ -1500,12 +1498,12 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $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/prelevement/create.php?type=bank-transfer&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); + $newmenu->add("/compta/prelevement/bons.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->rights->paymentbybanktransfer->read); + $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->rights->paymentbybanktransfer->read); + $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->rights->paymentbybanktransfer->read); + $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->rights->paymentbybanktransfer->read); } } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 6038754b023..691a63d8e07 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2258,24 +2258,24 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it print '
- '.$this->getName().' + '.$this->getName().' '.nl2br($this->getDesc()).''; /*print 'getVersion(1).'">'; print $this->getVersion(1); print ''; */ - print '
'; + print '
'; print '
'; - print '
'; - print $codeenabledisable; - print '
'; - print '
'; + print '
'; print $codetoconfig; print '
'; + print '
'; + print $codeenabledisable; + print '
'; print '
'; print ' diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 5e673d97611..90b627ea425 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -72,6 +72,9 @@ delete from llx_const where name = 'PROJECT_HIDE_TASKS' and entity = 0; -- For v12 +ALTER TABLE llx_prelevement_bons ADD COLUMN type varchar(16) DEFAULT 'debit-order'; + + -- Delete an old index that is duplicated -- VMYSQL4.1 DROP INDEX ix_fk_product_stock on llx_product_batch; -- VPGSQL8.2 DROP INDEX ix_fk_product_stock diff --git a/htdocs/install/mysql/tables/llx_prelevement_bons.sql b/htdocs/install/mysql/tables/llx_prelevement_bons.sql index e7e0b9a89f1..fc7f3f2f538 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_bons.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_bons.sql @@ -26,6 +26,7 @@ create table llx_prelevement_bons ( rowid integer AUTO_INCREMENT PRIMARY KEY, + type varchar(16) DEFAULT 'debit-order', -- 'debit-order' or 'bank-transfer' ref varchar(12), -- reference entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, -- date de creation diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index fef27b5b7de..bee43c2569f 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -541,8 +541,8 @@ Module54Name=Contracts/Subscriptions Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management -Module56Name=Payment by bank transfer -Module56Desc=Management of payment by bank transfer orders. It includes generation of SEPA file for European countries. +Module56Name=Payment by credit transfer +Module56Desc=Management of payment by credit transfer orders. It includes generation of SEPA file for European countries. Module57Name=Bank Direct Debit payments Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 48bd2b81c2e..17ebc2ff7ed 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -35,10 +35,10 @@ SwiftValid=BIC/SWIFT valid SwiftVNotalid=BIC/SWIFT not valid IbanValid=BAN valid IbanNotValid=BAN not valid -StandingOrders=Direct Debit orders +StandingOrders=Direct debit orders StandingOrder=Direct debit order -PaymentByBankTransfers=Payments by bank transfer -PaymentByBankTransfer=Payment by bank transfer +PaymentByBankTransfers=Payments by credit transfer +PaymentByBankTransfer=Payment by credit transfer AccountStatement=Account statement AccountStatementShort=Statement AccountStatements=Account statements diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index c5637c13cee..f60c9e18536 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -241,10 +241,6 @@ EscompteOffered=Discount offered (payment before term) EscompteOfferedShort=Discount SendBillRef=Submission of invoice %s SendReminderBillRef=Submission of invoice %s (reminder) -StandingOrders=Direct debit orders -StandingOrder=Direct debit order -PaymentByBankTransfers=Payments by bank transfer -PaymentByBankTransfer=Payment by bank transfer NoDraftBills=No draft invoices NoOtherDraftBills=No other draft invoices NoDraftInvoices=No draft invoices diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index ad51b045a37..fb6c56687ee 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -4,21 +4,22 @@ SuppliersStandingOrdersArea=Direct credit payment orders area StandingOrdersPayment=Direct debit payment orders StandingOrderPayment=Direct debit payment order NewStandingOrder=New direct debit order -NewPaymentByBankTransfer=New payment by bank transfer +NewPaymentByBankTransfer=New payment by credit transfer StandingOrderToProcess=To process -PaymentByBankTransferReceipts=Bank transfer orders -PaymentByBankTransferLines=Bank transfer order lines +PaymentByBankTransferReceipts=Credit transfer orders +PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -LatestBankTransferReceipts=Latest %s bank transfer orders +LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files WithdrawalsLines=Direct debit order lines RequestStandingOrderToTreat=Request for direct debit payment order to process 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. -NbOfInvoiceToWithdraw=No. of qualified invoice with waiting direct debit order +NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order NbOfInvoiceToWithdrawWithInfo=No. of customer invoice with direct debit payment orders having defined bank account information -SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by bank transfer +NbOfInvoiceToPayByBankTransfer=No. of qualified supplier invoices waiting for a payment by credit transfer +SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer InvoiceWaitingWithdraw=Invoice waiting for direct debit AmountToWithdraw=Amount to withdraw WithdrawsRefused=Direct debit refused diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index ed5097f5944..3af0f66a503 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -7,7 +7,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> --btncolorbg: #fbfbfb; --btncolorborderhover: none; --btncolorborder: #FFF; - --butactionbg:rgb(225, 235, 225); + --butactionbg:rgb(218, 235, 225); --butactiondeletebg: rgb(234,228,225); } diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 479bb3f889b..227134bc785 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -363,7 +363,9 @@ a.top-menu-dropdown-link { content: "\f0da"; /* color: rgba(0,0,0,0.3); */ } - +.dropdown-item.bookmark-item-external::before { + content: "\f35d"; +} .dropdown-item.active, .dropdown-item:hover, .dropdown-item:focus { color: # !important; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index bdd9e6a55c5..6034df321d0 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2650,8 +2650,8 @@ li.expanded > a.fmdirlia.jqft.ecmjqft { div.tabs { text-align: ; padding-top: 10px; - padding-left: 6px !important; - padding-right: 6px !important; + padding-left: 6px; + padding-right: 6px; clear:both; height:100%; } @@ -2869,6 +2869,9 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd .nopaddingleft { padding-: 0px; } +div.tabs.nopaddingleft { + padding-: 0px; +} .nopaddingright { padding-: 0px; } @@ -5121,6 +5124,9 @@ span#select2-taskid-container[title^='--'] { background-color: rgb(); color: #; } +.select2-container--default .select2-results__option--highlighted[aria-selected] span { + color: #fff !important; +} span.select2.select2-container.select2-container--default { border-left: none; diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index a0f54591534..badc7f2d655 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -17,15 +17,21 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> min-height: 90px; /* background: #fff; */ width: 100%; - box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 1px 1px 2px rgba(128, 128, 128, 0.2); border-radius: 2px; - border: 1px solid #eee; + border: 1px solid #e9e9e9; margin-bottom: 15px; } .info-box.info-box-sm{ min-height: 80px; margin-bottom: 10px; } +.info-box-more { + float: right; + top: 6px; + position: absolute; + right: 10px; +} .info-box small { font-size: 14px; @@ -74,13 +80,13 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> height: 80px; width: 80px; font-size: 25px; - line-height: 100px; + line-height: 92px; } .opened-dash-board-wrap .info-box-sm .info-box-icon { line-height: 80px; } .info-box-module .info-box-icon { - height: 107px; + height: 98px; } .info-box-icon > img { max-width: 100%; @@ -152,12 +158,19 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> .info-box-content { padding: 5px 10px; - margin-left: 90px; + margin-left: 84px; } .info-box-sm .info-box-content{ margin-left: 80px; } +/*.info-box-setup span { + color: var(--colortexttitlenotab2); +} +.tdsetuppicto span { + color: var(--colortexttitlenotab2); +}*/ + .info-box-number { display: block; font-weight: bold; @@ -175,7 +188,8 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> .info-box-title{ text-transform: uppercase; font-weight: bold; - padding-bottom: 4px; + margin-bottom: 6px; + /* padding-bottom: 4px; */ } .info-box-text{ font-size: 0.92em; @@ -373,7 +387,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = max-width: 350px; } .info-box-module .info-box-content { - height: 7em; + height: 6.4em; } /* Disabled. This break the responsive on smartphone .box{ diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index 65ff1811269..f1c58b4241e 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -3,14 +3,18 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> /*