';
- print '| '.$langs->trans("LastContracts", ($num <= $MAXLIST ? "" : $MAXLIST)).' | ';
+ print ' | ';
@@ -921,15 +921,24 @@ if ($object->id > 0)
$contrat->ref = $objp->ref ? $objp->ref : $objp->id;
$contrat->ref_customer = $objp->refcus;
$contrat->ref_supplier = $objp->refsup;
+ $contrat->statut = $objp->contract_status;
$contrat->fetch_lines();
+ $late = '';
+ foreach ($contrat->lines as $line) {
+ if ($contrat->statut == Contrat::STATUS_VALIDATED && $line->statut == ContratLigne::STATUS_OPEN) {
+ if (($line->date_fin_validite + $conf->contrat->services->expires->warning_delay) < $now) $late = img_warning($langs->trans("Late"));
+ }
+ }
+
print ' ';
print '| ';
print $contrat->getNomUrl(1, 12);
+ print $late;
print " | \n";
print ''.dol_trunc($objp->refsup, 12)." | \n";
- print ''.dol_print_date($db->jdate($objp->dc), 'day')." | \n";
- print ''.dol_print_date($db->jdate($objp->dcon), 'day')." | \n";
+ //print ''.dol_print_date($db->jdate($objp->dc), 'day')." | \n";
+ print ''.dol_print_date($db->jdate($objp->dcon), 'day')." | \n";
print ' | ';
print '';
print $contrat->getLibStatut(4);
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index 10cde50f478..ca611350b24 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -29,11 +29,14 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
if (!$user->rights->facture->lire) accessforbidden();
@@ -44,14 +47,18 @@ $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); //
$ref = GETPOST('ref', 'alpha');
$socid = GETPOST('socid', 'int');
$action = GETPOST('action', 'alpha');
-
$type = GETPOST('type', 'aZ09');
+$mode = GETPOST('mode', 'aZ09');
$fieldid = (!empty($ref) ? 'ref' : 'rowid');
if ($user->socid) $socid = $user->socid;
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid);
-$object = new Facture($db);
+if ($mode == 'bank-transfer') {
+ $object = new FactureFournisseur($db);
+} else {
+ $object = new Facture($db);
+}
// Load object
if ($id > 0 || !empty($ref))
@@ -122,13 +129,20 @@ if (empty($reshook))
* View
*/
+$form = new Form($db);
+
$now = dol_now();
-$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('StandingOrders');
-$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
+if ($mode == 'bank-transfer') {
+ $title = $langs->trans('InvoiceSupplier')." - ".$langs->trans('CreditTransfer');
+ $helpurl = "";
+} else {
+ $title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('StandingOrders');
+ $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
+}
+
llxHeader('', $title, $helpurl);
-$form = new Form($db);
/* *************************************************************************** */
/* */
@@ -154,18 +168,33 @@ if ($object->id > 0)
if ($object->paye) $resteapayer = 0;
$resteapayeraffiche = $resteapayer;
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
- $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
- } else {
- $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')";
- $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
- }
+ if ($mode == 'bank-transfer') {
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { // Never use this
+ $filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
+ $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
+ } else {
+ $filterabsolutediscount = "fk_invoice_supplier_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS PAID)%')";
+ $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS PAID)%')";
+ }
- $absolute_discount = $object->thirdparty->getAvailableDiscounts('', $filterabsolutediscount);
- $absolute_creditnote = $object->thirdparty->getAvailableDiscounts('', $filtercreditnote);
- $absolute_discount = price2num($absolute_discount, 'MT');
- $absolute_creditnote = price2num($absolute_creditnote, 'MT');
+ $absolute_discount = $object->thirdparty->getAvailableDiscounts('', $filterabsolutediscount, 0, 1);
+ $absolute_creditnote = $object->thirdparty->getAvailableDiscounts('', $filtercreditnote, 0, 1);
+ $absolute_discount = price2num($absolute_discount, 'MT');
+ $absolute_creditnote = price2num($absolute_creditnote, 'MT');
+ } else {
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
+ $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
+ } else {
+ $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')";
+ $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
+ }
+
+ $absolute_discount = $object->thirdparty->getAvailableDiscounts('', $filterabsolutediscount);
+ $absolute_creditnote = $object->thirdparty->getAvailableDiscounts('', $filtercreditnote);
+ $absolute_discount = price2num($absolute_discount, 'MT');
+ $absolute_creditnote = price2num($absolute_creditnote, 'MT');
+ }
$author = new User($db);
if ($object->user_author)
@@ -173,20 +202,37 @@ if ($object->id > 0)
$author->fetch($object->user_author);
}
- $head = facture_prepare_head($object);
+ if ($mode == 'bank-transfer') {
+ $head = facturefourn_prepare_head($object);
+ } else {
+ $head = facture_prepare_head($object);
+ }
- dol_fiche_head($head, 'standingorders', $langs->trans('InvoiceCustomer'), -1, 'bill');
+ dol_fiche_head($head, 'standingorders', $title, -1, 'bill');
// Invoice content
-
- $linkback = ''.$langs->trans("BackToList").'';
+ if ($mode == 'bank-transfer') {
+ $linkback = ''.$langs->trans("BackToList").'';
+ } else {
+ $linkback = ''.$langs->trans("BackToList").'';
+ }
$morehtmlref = '';
// Ref customer
- $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
- $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
+ if ($mode == 'bank-transfer') {
+ $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1);
+ $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1);
+ } else {
+ $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
+ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
+ }
// Thirdparty
$morehtmlref .= ' '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
+ if ($mode == 'bank-transfer') {
+ if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ( '.$langs->trans("OtherBills").')';
+ } else {
+ if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ( '.$langs->trans("OtherBills").')';
+ }
// Project
if (!empty($conf->projet->enabled))
{
@@ -237,15 +283,26 @@ if ($object->id > 0)
// Type
print ' | '.$langs->trans('Type').' | ';
print $object->getLibType();
- if ($object->type == Facture::TYPE_REPLACEMENT)
+ if ($object->module_source) {
+ print ' ('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')';
+ }
+ if ($object->type == $object::TYPE_REPLACEMENT)
{
- $facreplaced = new Facture($db);
+ if ($mode == 'bank-transfer') {
+ $facreplaced = new FactureFournisseur($db);
+ } else {
+ $facreplaced = new Facture($db);
+ }
$facreplaced->fetch($object->fk_facture_source);
print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')';
}
- if ($object->type == Facture::TYPE_CREDIT_NOTE)
+ if ($object->type == $object::TYPE_CREDIT_NOTE)
{
- $facusing = new Facture($db);
+ if ($mode == 'bank-transfer') {
+ $facusing = new FactureFournisseur($db);
+ } else {
+ $facusing = new Facture($db);
+ }
$facusing->fetch($object->fk_facture_source);
print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')';
}
@@ -259,7 +316,11 @@ if ($object->id > 0)
{
if ($i == 0) print ' ';
else print ',';
- $facavoir = new Facture($db);
+ if ($mode == 'bank-transfer') {
+ $facavoir = new FactureFournisseur($db);
+ } else {
+ $facavoir = new Facture($db);
+ }
$facavoir->fetch($id);
print $facavoir->getNomUrl(1);
}
@@ -278,33 +339,48 @@ if ($object->id > 0)
// Discounts
print ' | | '.$langs->trans('Discounts').' | ';
- $thirdparty = $object->thirdparty;
- $discount_type = 0;
+ if ($mode == 'bank-transfer') {
+ //$societe = new Fournisseur($db);
+ //$result = $societe->fetch($object->socid);
+ $thirdparty = $object->thirdparty;
+ $discount_type = 1;
+ } else {
+ $thirdparty = $object->thirdparty;
+ $discount_type = 0;
+ }
$backtopage = urlencode($_SERVER["PHP_SELF"].'?facid='.$object->id);
$cannotApplyDiscount = 1;
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
print ' | ';
+ // Label
+ if ($mode == 'bank-transfer') {
+ print ' ';
+ print '| '.$form->editfieldkey("Label", 'label', $object->label, $object, 0).' | ';
+ print ''.$form->editfieldval("Label", 'label', $object->label, $object, 0).' | ';
+ print ' ';
+ }
+
// Date invoice
print ' | ';
print '';
print ' | ';
- if ($object->type != Facture::TYPE_CREDIT_NOTE)
+ if ($object->type != $object::TYPE_CREDIT_NOTE)
{
if ($action == 'editinvoicedate')
{
$form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id, $object->date, 'invoicedate');
} else {
- print dol_print_date($object->date, 'daytext');
+ print dol_print_date($object->date, 'day');
}
} else {
- print dol_print_date($object->date, 'daytext');
+ print dol_print_date($object->date, 'day');
}
print ' | ';
print ' ';
@@ -314,10 +390,10 @@ if ($object->id > 0)
print ' ';
print ' | ';
- if ($object->type != Facture::TYPE_CREDIT_NOTE)
+ if ($object->type != $object::TYPE_CREDIT_NOTE)
{
if ($action == 'editconditions')
{
@@ -335,16 +411,21 @@ if ($object->id > 0)
print '';
print ' | ';
- if ($object->type != Facture::TYPE_CREDIT_NOTE)
+ if ($object->type != $object::TYPE_CREDIT_NOTE)
{
+ $duedate = $object->date_lim_reglement;
+ if ($mode == 'bank-transfer') {
+ $duedate = $object->date_echeance;
+ }
+
if ($action == 'editpaymentterm')
{
- $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id, $object->date_lim_reglement, 'paymentterm');
+ $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id, $duedate, 'paymentterm');
} else {
- print dol_print_date($object->date_lim_reglement, 'daytext');
+ print dol_print_date($duedate, 'day');
if ($object->hasDelay()) {
print img_warning($langs->trans('Late'));
}
@@ -537,8 +618,13 @@ if ($object->id > 0)
print "\n \n";
- print ''.$langs->trans("DoStandingOrdersBeforePayments").' ';
-
+ if ($mode == 'bank-transfer') {
+ print ''.$langs->trans("DoCreditTransferBeforePayments").' ';
+ } else {
+ print ''.$langs->trans("DoStandingOrdersBeforePayments").' ';
+ }
/*
* Withdrawals
@@ -585,7 +676,11 @@ if ($object->id > 0)
print ' | '.$langs->trans("DateRequest").' | ';
print ''.$langs->trans("User").' | ';
print ''.$langs->trans("Amount").' | ';
- print ''.$langs->trans("WithdrawalReceipt").' | ';
+ if ($mode == 'bank-transfer') {
+ print ''.$langs->trans("BankTransferReceipt").' | ';
+ } else {
+ print ''.$langs->trans("WithdrawalReceipt").' | ';
+ }
print ' | ';
print ''.$langs->trans("DateProcess").' | ';
print ' | ';
diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php
index 48268b28914..d5cc859eaa7 100644
--- a/htdocs/core/boxes/box_external_rss.php
+++ b/htdocs/core/boxes/box_external_rss.php
@@ -101,13 +101,15 @@ class box_external_rss extends ModeleBoxes
if ($result < 0 || !empty($rssparser->error))
{
// Show warning
- $title .= " ".img_error($langs->trans("FailedToRefreshDataInfoNotUpToDate", ($rssparser->getLastFetchDate() ?dol_print_date($rssparser->getLastFetchDate(), "dayhourtext") : $langs->trans("Unknown"))));
+ $errormessage = $langs->trans("FailedToRefreshDataInfoNotUpToDate", ($rssparser->getLastFetchDate() ? dol_print_date($rssparser->getLastFetchDate(), "dayhourtext") : $langs->trans("Unknown")));
+ if ($rssparser->error) $errormessage .= " - ".$rssparser->error;
+ $title .= " ".img_error($errormessage);
$this->info_box_head = array('text' => $title, 'limit' => 0);
} else {
$this->info_box_head = array(
'text' => $title,
'sublink' => $link,
- 'subtext'=>$langs->trans("LastRefreshDate").': '.($rssparser->getLastFetchDate() ?dol_print_date($rssparser->getLastFetchDate(), "dayhourtext") : $langs->trans("Unknown")),
+ 'subtext'=>$langs->trans("LastRefreshDate").': '.($rssparser->getLastFetchDate() ? dol_print_date($rssparser->getLastFetchDate(), "dayhourtext") : $langs->trans("Unknown")),
'subpicto'=>'globe',
'target'=>'_blank',
);
diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php
index f81e8e72a51..f645062dcab 100644
--- a/htdocs/core/boxes/box_services_contracts.php
+++ b/htdocs/core/boxes/box_services_contracts.php
@@ -90,7 +90,7 @@ class box_services_contracts extends ModeleBoxes
$sql = "SELECT s.nom as name, s.rowid as socid, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
$sql .= " c.rowid, c.ref, c.statut as contract_status, c.ref_customer, c.ref_supplier,";
- $sql .= " cd.rowid as cdid, cd.label, cd.description, cd.tms as datem, cd.statut, cd.product_type as type,";
+ $sql .= " cd.rowid as cdid, cd.label, cd.description, cd.tms as datem, cd.statut, cd.product_type as type, cd.date_fin_validite as date_line,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as plabel, p.fk_product_type as ptype, p.entity, p.tobuy, p.tosell";
$sql .= " FROM (".MAIN_DB_PREFIX."societe as s";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."contrat as c ON s.rowid = c.fk_soc";
@@ -113,6 +113,8 @@ class box_services_contracts extends ModeleBoxes
while ($i < $num)
{
+ $late = '';
+
$objp = $this->db->fetch_object($result);
$datem = $this->db->jdate($objp->datem);
@@ -124,11 +126,11 @@ class box_services_contracts extends ModeleBoxes
$contractlinestatic->product_id = $objp->product_id;
$contractlinestatic->product_ref = $objp->product_ref;
- $contractstatic->statut = $objp->contract_status;
$contractstatic->id = $objp->rowid;
$contractstatic->ref = $objp->ref;
$contractstatic->ref_customer = $objp->ref_customer;
$contractstatic->ref_supplier = $objp->ref_supplier;
+ $contractstatic->statut = $objp->contract_status;
$thirdpartytmp->name = $objp->name;
$thirdpartytmp->id = $objp->socid;
@@ -140,6 +142,9 @@ class box_services_contracts extends ModeleBoxes
$thirdpartytmp->code_compta = $objp->code_compta;
$thirdpartytmp->code_compta_fournisseur = $objp->code_compta_fournisseur;
+ $dateline = $this->db->jdate($objp->date_line);
+ if ($contractstatic->statut == Contrat::STATUS_VALIDATED && $objp->statut == ContratLigne::STATUS_OPEN && ($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late = img_warning($langs->trans("Late"));
+
// Multilangs
if (!empty($conf->global->MAIN_MULTILANGS) && $objp->product_id > 0) // if option multilang is on
{
@@ -212,6 +217,7 @@ class box_services_contracts extends ModeleBoxes
$this->info_box_contents[$i][] = array(
'td' => '',
'text' => dol_print_date($datem, 'day'),
+ 'text2'=> $late,
);
$this->info_box_contents[$i][] = array(
diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php
index 56c6bdd216b..21c5b2ad200 100644
--- a/htdocs/core/class/rssparser.class.php
+++ b/htdocs/core/class/rssparser.class.php
@@ -254,9 +254,15 @@ class RssParser
libxml_use_internal_errors(false);
$rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA);
} else {
+ if (! function_exists('xml_parser_create')) {
+ $this->error = 'Function xml_parser_create are not supported by your PHP';
+ return -1;
+ }
+
$xmlparser = xml_parser_create('');
if (!is_resource($xmlparser)) {
- $this->error = "ErrorFailedToCreateParser"; return -1;
+ $this->error = "ErrorFailedToCreateParser";
+ return -1;
}
xml_set_object($xmlparser, $this);
diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php
index 3b41f2620b4..8d0e767c943 100644
--- a/htdocs/core/lib/fourn.lib.php
+++ b/htdocs/core/lib/fourn.lib.php
@@ -53,6 +53,28 @@ function facturefourn_prepare_head($object)
$h++;
}
+ //if ($fac->mode_reglement_code == 'PRE')
+ if (!empty($conf->paymentbybanktransfer->enabled))
+ {
+ $nbStandingOrders = 0;
+ $sql = "SELECT COUNT(pfd.rowid) as nb";
+ $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
+ $sql .= " WHERE pfd.fk_facture_fourn = ".$object->id;
+ $sql .= " AND pfd.ext_payment_id IS NULL";
+ $resql = $db->query($sql);
+ if ($resql)
+ {
+ $obj = $db->fetch_object($resql);
+ if ($obj) $nbStandingOrders = $obj->nb;
+ }
+ else dol_print_error($db);
+ $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id.'&mode=bank-transfer';
+ $head[$h][1] = $langs->trans('BankTransfer');
+ if ($nbStandingOrders > 0) $head[$h][1] .= ''.$nbStandingOrders.'';
+ $head[$h][2] = 'standingorders';
+ $h++;
+ }
+
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php
index 31b201fce50..cf3d0df5c9f 100644
--- a/htdocs/core/lib/invoice.lib.php
+++ b/htdocs/core/lib/invoice.lib.php
@@ -55,7 +55,6 @@ function facture_prepare_head($object)
$h++;
}
- //if ($fac->mode_reglement_code == 'PRE')
if (!empty($conf->prelevement->enabled))
{
$nbStandingOrders = 0;
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index c10b9dbf162..d404f52ea48 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -352,7 +352,7 @@ if ($object->id > 0)
// Lien recap
$boxstat .= '';
$boxstat .= ' ';
- $boxstat .= '| ';
+ $boxstat .= ' | | ';
if ($conf->supplier_proposal->enabled)
{
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 3e5f0ddb8af..384359ae92f 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -2490,14 +2490,6 @@ if ($action == 'create')
// Date
print ' | | '.$form->editfieldkey("DateInvoice", 'datef', $object->datep, $object, $form_permission, 'datepicker').' | ';
print $form->editfieldval("Date", 'datef', $object->datep, $object, $form_permission, 'datepicker');
- print ' | ';
-
- // Due date
- print ' | '.$form->editfieldkey("DateMaxPayment", 'date_lim_reglement', $object->date_echeance, $object, $form_permission, 'datepicker').' | ';
- print $form->editfieldval("DateMaxPayment", 'date_lim_reglement', $object->date_echeance, $object, $form_permission, 'datepicker');
- if ($action != 'editdate_lim_reglement' && $object->hasDelay()) {
- print img_warning($langs->trans('Late'));
- }
print ' | ';
// Default terms of the settlement
@@ -2520,6 +2512,14 @@ if ($action == 'create')
print "";
print ' ';
+ // Due date
+ print '| '.$form->editfieldkey("DateMaxPayment", 'date_lim_reglement', $object->date_echeance, $object, $form_permission, 'datepicker').' | ';
+ print $form->editfieldval("DateMaxPayment", 'date_lim_reglement', $object->date_echeance, $object, $form_permission, 'datepicker');
+ if ($action != 'editdate_lim_reglement' && $object->hasDelay()) {
+ print img_warning($langs->trans('Late'));
+ }
+ print ' | ';
+
// Mode of payment
$langs->load('bills');
print ' ';
diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php
index 5cd1043de8f..477086b3ca3 100644
--- a/htdocs/fourn/facture/contact.php
+++ b/htdocs/fourn/facture/contact.php
@@ -186,7 +186,7 @@ if ($id > 0 || !empty($ref))
print '';
print ' ';
- print ' ';
+ print '';
// Type
print '| '.$langs->trans('Type').' | ';
diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql
index 8c50964eb59..f335a93cfeb 100644
--- a/htdocs/install/mysql/tables/llx_actioncomm.sql
+++ b/htdocs/install/mysql/tables/llx_actioncomm.sql
@@ -17,7 +17,8 @@
-- along with this program. If not, see .
--
--
--- Actions commerciales
+-- Table of events and actions (past and to do).
+-- This is also the table to track events on other Dolibarr objects.
-- ========================================================================
create table llx_actioncomm
@@ -40,7 +41,7 @@ create table llx_actioncomm
fk_soc integer,
fk_contact integer,
fk_parent integer NOT NULL default 0,
- fk_user_action integer, -- user id of owner of action (note that users assigned to event are stored into another table)
+ fk_user_action integer, -- user id of owner of action (note that users assigned to event are stored into table 'actioncomm_resources')
fk_user_done integer, -- user id of user that has made action (deprecated)
transparency integer, -- transparency (ical standard). used to say if user assigned to event are busy or not by event. This field may be deprecated if we want to store transparency for each assigned user, moved into table llx_actioncomm_resources.
diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang
index 17ebc2ff7ed..7a36346733f 100644
--- a/htdocs/langs/en_US/banks.lang
+++ b/htdocs/langs/en_US/banks.lang
@@ -105,8 +105,8 @@ SupplierInvoicePayment=Vendor payment
SubscriptionPayment=Subscription payment
WithdrawalPayment=Debit payment order
SocialContributionPayment=Social/fiscal tax payment
-BankTransfer=Bank transfer
-BankTransfers=Bank transfers
+BankTransfer=Credit transfer
+BankTransfers=Credit transfers
MenuBankInternalTransfer=Internal transfer
TransferDesc=Transfer from one account to another, Dolibarr will write two records (a debit in source account and a credit in target account). The same amount (except sign), label and date will be used for this transaction)
TransferFrom=From
diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang
index c80db907a84..bea89f1d5d0 100644
--- a/htdocs/langs/en_US/withdrawals.lang
+++ b/htdocs/langs/en_US/withdrawals.lang
@@ -40,6 +40,7 @@ CreditTransferStatistics=Credit transfer statistics
Rejects=Rejects
LastWithdrawalReceipt=Latest %s direct debit receipts
MakeWithdrawRequest=Make a direct debit payment request
+MakeBankTransferOrder=Make a credit transfer request
WithdrawRequestsDone=%s direct debit payment requests recorded
ThirdPartyBankCode=Third-party bank code
NoInvoiceCouldBeWithdrawed=No invoice debited successfully. Check that invoices are on companies with a valid IBAN and that IBAN has a UMR (Unique Mandate Reference) with mode %s.
@@ -93,6 +94,7 @@ WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your cou
ShowWithdraw=Show Direct Debit Order
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management.
DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to manage the direct debit payment order. When payment order is closed, payment on invoice will be automatically recorded, and invoice closed if remainder to pay is null.
+DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to manage the credit transfer payment order. When payment order is closed, payment on invoice will be automatically recorded, and invoice closed if remainder to pay is null.
WithdrawalFile=Withdrawal file
SetToStatusSent=Set to status "File Sent"
ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null
@@ -103,6 +105,7 @@ RUMLong=Unique Mandate Reference
RUMWillBeGenerated=If empty, a UMR (Unique Mandate Reference) will be generated once the bank account information is saved.
WithdrawMode=Direct debit mode (FRST or RECUR)
WithdrawRequestAmount=Amount of Direct debit request:
+BankTransferAmount=Amount of Credit Transfer request:
WithdrawRequestErrorNilAmount=Unable to create direct debit request for empty amount.
SepaMandate=SEPA Direct Debit Mandate
SepaMandateShort=SEPA Mandate
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index b749fe90722..a524e18ae33 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -3632,6 +3632,11 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
padding-bottom: 2px;
width: 118px;
}
+
+td.tdboxstats .boxstats {
+ box-shadow: 1px 1px 8px var(--colorboxstatsborder);
+}
+
.tabBar .fichehalfright .boxstats {
padding-top: 8px;
padding-bottom: 4px;
| |
|