Merge remote-tracking branch 'Dolibarr/12.0' into 12

This commit is contained in:
Francis Appels 2020-07-29 16:50:27 +02:00
commit 3eb8796b0d
98 changed files with 710 additions and 257 deletions

View File

@ -8,6 +8,7 @@ ALL:
Check "@CHANGE"
PrestaShopWebservice:
---------------------
Replace
@ -27,6 +28,19 @@ With
DEBUGBAR:
---------
Move
this.options = {
bodyMarginBottom: true,
bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')),
};
few line lower in the
initialize: function() {
ESCPOS:
-------
Replace

View File

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03">
<CstmrCdtTrfInitn>
<GrpHdr>
<MsgId>message-id-001</MsgId>
<CreDtTm>2010-09-28T14:07:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>10.1</CtrlSum>
<InitgPty>
<Nm>Bedrijfsnaam</Nm>
<Id>
<OrgId>
<Othr>
<Id>123456789123456</Id>
</Othr>
</OrgId>
</Id>
</InitgPty>
</GrpHdr>
<PmtInf>
<PmtInfId>minimaal gevuld</PmtInfId>
<PmtMtd>TRF</PmtMtd>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>10.1</CtrlSum>
<ReqdExctnDt>2009-11-01</ReqdExctnDt>
<Dbtr>
<Nm>Naam</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>NL44RABO0123456789</IBAN>
</Id>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<BIC>RABONL2U</BIC>
</FinInstnId>
</DbtrAgt>
<CdtTrfTxInf>
<PmtId>
<EndToEndId>non ref</EndToEndId>
</PmtId>
<Amt>
<InstdAmt Ccy="EUR">10.1</InstdAmt>
</Amt>
<ChrgBr>SLEV</ChrgBr>
<CdtrAgt>
<FinInstnId>
<BIC>ABNANL2A</BIC>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<Nm>Naam creditor</Nm>
</Cdtr>
<CdtrAcct>
<Id>
<IBAN>NL90ABNA0111111111</IBAN>
</Id>
</CdtrAcct>
<RmtInf>
<Ustrd>vrije tekst</Ustrd>
</RmtInf>
</CdtTrfTxInf>
</PmtInf>
<PmtInf>
<PmtInfId>maximaal gevuld</PmtInfId>
<PmtMtd>TRF</PmtMtd>
<BtchBookg>true</BtchBookg>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>20.2</CtrlSum>
<PmtTpInf>
<InstrPrty>NORM</InstrPrty>
<SvcLvl>
<Cd>SEPA</Cd>
</SvcLvl>
<LclInstrm>
<Cd>IDEAL</Cd>
</LclInstrm>
<CtgyPurp>
<Cd>SECU</Cd>
</CtgyPurp>
</PmtTpInf>
<ReqdExctnDt>2009-11-01</ReqdExctnDt>
<Dbtr>
<Nm>Naam</Nm>
<PstlAdr>
<Ctry>NL</Ctry>
<AdrLine>Debtor straat 1</AdrLine>
<AdrLine>9999 XX Plaats debtor</AdrLine>
</PstlAdr>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>NL44RABO0123456789</IBAN>
</Id>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<BIC>RABONL2U</BIC>
</FinInstnId>
</DbtrAgt>
<UltmtDbtr>
<Id>
<OrgId>
<Othr>
<Id>12345678</Id>
<SchmeNm>
<Prtry>klantnummer</Prtry>
</SchmeNm>
<Issr>klantnummer uitgifte instantie</Issr>
</Othr>
</OrgId>
</Id>
</UltmtDbtr>
<ChrgBr>SLEV</ChrgBr>
<CdtTrfTxInf>
<PmtId>
<InstrId>debtor-to-debtor-bank-01</InstrId>
<EndToEndId>End-to-end-id-debtor-to-creditor-01</EndToEndId>
</PmtId>
<Amt>
<InstdAmt Ccy="EUR">20.2</InstdAmt>
</Amt>
<CdtrAgt>
<FinInstnId>
<BIC>ABNANL2A</BIC>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<Nm>Naam creditor</Nm>
<PstlAdr>
<Ctry>NL</Ctry>
<AdrLine>Straat creditor 1</AdrLine>
<AdrLine>9999 XX Plaats creditor</AdrLine>
</PstlAdr>
</Cdtr>
<CdtrAcct>
<Id>
<IBAN>NL90ABNA0111111111</IBAN>
</Id>
</CdtrAcct>
<UltmtCdtr>
<Id>
<PrvtId>
<DtAndPlcOfBirth>
<BirthDt>1969-07-03</BirthDt>
<CityOfBirth>PLAATS</CityOfBirth>
<CtryOfBirth>NL</CtryOfBirth>
</DtAndPlcOfBirth>
</PrvtId>
</Id>
</UltmtCdtr>
<Purp>
<Cd>CHAR</Cd>
</Purp>
<RmtInf>
<Strd>
<CdtrRefInf>
<Tp>
<CdOrPrtry>
<Cd>SCOR</Cd>
</CdOrPrtry>
<Issr>CUR</Issr>
</Tp>
<Ref>1234567</Ref>
</CdtrRefInf>
</Strd>
</RmtInf>
</CdtTrfTxInf>
</PmtInf>
</CstmrCdtTrfInitn>
</Document>

View File

@ -324,7 +324,7 @@ $boxactivated = InfoBox::listBoxes($db, 'activated', -1, null);
print "<br>\n";
print "\n\n".'<!-- Boxes Available -->'."\n";
print load_fiche_titre($langs->trans("BoxesAvailable"));
print load_fiche_titre($langs->trans("BoxesAvailable"), '', '');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
@ -390,7 +390,7 @@ print "\n".'<!-- End Boxes Available -->'."\n";
//var_dump($boxactivated);
print "<br>\n\n";
print load_fiche_titre($langs->trans("BoxesActivated"));
print load_fiche_titre($langs->trans("BoxesActivated"), '', '');
print '<div class="div-table-responsive-no-min">';
print '<table class="tagtable liste">'."\n";
@ -452,7 +452,7 @@ print '<br>';
// Other parameters
print "\n\n".'<!-- Other Const -->'."\n";
print load_fiche_titre($langs->trans("Other"));
print load_fiche_titre($langs->trans("Other"), '', '');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="addconst">';

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2005-2020 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@ -33,6 +33,10 @@ if (!$user->admin) accessforbidden();
$action = GETPOST('action', 'aZ09');
if (! in_array('clicktodial', $conf->modules)) {
accessforbidden($langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module58Name")));
}
/*
* Actions
@ -58,6 +62,8 @@ if ($action == 'setvalue' && $user->admin)
* View
*/
$form = new Form($db);
$user->fetch_clicktodial();
$wikihelp = 'EN:Module_ClickToDial_En|FR:Module_ClickToDial|ES:Módulo_ClickTodial_Es';
@ -73,6 +79,7 @@ print '<form method="post" action="clicktodial.php">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="setvalue">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
@ -105,6 +112,7 @@ print $langs->trans("Example").':<br>http://myphoneserver/mypage?login=__LOGIN__
print '</td></tr>';
print '</table>';
print '</div>';
print '<div class="center"><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';

View File

@ -93,7 +93,7 @@ print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup')
print '<br>';
$head = expedition_admin_prepare_head();
dol_fiche_head($head, 'general', $langs->trans("Sendings"), -1, 'sending');
dol_fiche_head($head, 'general', $langs->trans("Sendings"), -1, 'shipment');
// Miscellaneous parameters

View File

@ -197,7 +197,7 @@ print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup')
print '<br>';
$head = expedition_admin_prepare_head();
dol_fiche_head($head, 'shipment', $langs->trans("Sendings"), -1, 'sending');
dol_fiche_head($head, 'shipment', $langs->trans("Sendings"), -1, 'shipment');
// Shipment numbering model

View File

@ -76,7 +76,7 @@ print "<br>\n";
$head = expedition_admin_prepare_head();
dol_fiche_head($head, 'attributes_shipment', $langs->trans("Sendings"), -1, 'sending');
dol_fiche_head($head, 'attributes_shipment', $langs->trans("Sendings"), -1, 'shipment');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@ -77,7 +77,7 @@ print "<br>\n";
$head = expedition_admin_prepare_head();
dol_fiche_head($head, 'attributeslines_shipment', $langs->trans("Sendings"), -1, 'sending');
dol_fiche_head($head, 'attributeslines_shipment', $langs->trans("Sendings"), -1, 'shipment');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@ -187,7 +187,7 @@ print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup')
print '<br>';
$head = expedition_admin_prepare_head();
dol_fiche_head($head, 'receivings', $langs->trans("Receivings"), -1, 'sending');
dol_fiche_head($head, 'receivings', $langs->trans("Receivings"), -1, 'shipment');
// Delivery numbering model

View File

@ -76,7 +76,7 @@ print "<br>\n";
$head = expedition_admin_prepare_head();
dol_fiche_head($head, 'attributes_receivings', $langs->trans("Receivings"), -1, 'sending');
dol_fiche_head($head, 'attributes_receivings', $langs->trans("Receivings"), -1, 'shipment');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@ -77,7 +77,7 @@ print "<br>\n";
$head = expedition_admin_prepare_head();
dol_fiche_head($head, 'attributeslines_receivings', $langs->trans("Receivings"), -1, 'sending');
dol_fiche_head($head, 'attributeslines_receivings', $langs->trans("Receivings"), -1, 'shipment');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@ -153,7 +153,7 @@ print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">';
dol_fiche_head($head, 'handler', $langs->trans("Menus"), -1);
dol_fiche_head($head, 'handler', '', -1);
print '<span class="opacitymedium">'.$langs->trans("MenusDesc")."</span><br>\n";
print "<br>\n";

View File

@ -235,7 +235,7 @@ $head[$h][1] = $langs->trans("Miscellaneous");
$head[$h][2] = 'misc';
$h++;
dol_fiche_head($head, 'editor', $langs->trans("Menus"), -1);
dol_fiche_head($head, 'editor', '', -1);
print '<span class="opacitymedium">'.$langs->trans("MenusEditorDesc")."</span><br>\n";
print "<br>\n";

View File

@ -76,7 +76,7 @@ $head[$h][1] = $langs->trans("Miscellaneous");
$head[$h][2] = 'misc';
$h++;
dol_fiche_head($head, 'misc', $langs->trans("Menus"), -1);
dol_fiche_head($head, 'misc', '', -1);
// Other Options

View File

@ -28,7 +28,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php';
if (!empty($conf->resouce->enabled)) require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
// Load translation files required by the page
$langs->loadLangs(array("admin", "resource"));

View File

@ -119,7 +119,7 @@ else
print '<td>'.$obj->Engine.'</td>';
if (isset($obj->Engine) && $obj->Engine == "MyISAM")
{
print '<td><a class="reposition" href="database-tables.php?action=convert&amp;table='.$obj->Name.'">'.$langs->trans("Convert").' InnoDB</a></td>';
print '<td><a class="reposition" href="database-tables.php?action=convert&amp;table='.$obj->Name.'">'.$langs->trans("Convert").' InnoDb</a></td>';
}
else
{

View File

@ -241,7 +241,8 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
print '<label for="checkbox_sql_structure">'.$langs->trans('ExportStructure').'</label>';
print '</legend>';
print '<input type="checkbox" name="drop"'.(((!isset($_GET["drop"]) && !isset($_POST["drop"])) || GETPOST('drop')) ? ' checked' : '').' id="checkbox_dump_drop" />';
print '<input type="checkbox" name="drop"'.((! GETPOSTISSET("drop") || GETPOST('drop')) ? ' checked' : '').' id="checkbox_dump_drop" />';
print '<label for="checkbox_dump_drop">'.$langs->trans("AddDropTable").'</label>';
print '<br>';
print '</fieldset>';

View File

@ -40,7 +40,7 @@ $transkey = GETPOST('transkey', 'alphanohtml');
$transvalue = GETPOST('transvalue', 'none');
$mode = GETPOST('mode', 'aZ09') ?GETPOST('mode', 'aZ09') : 'overwrite';
$mode = GETPOST('mode', 'aZ09') ?GETPOST('mode', 'aZ09') : 'searchkey';
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
@ -514,7 +514,7 @@ if ($mode == 'searchkey')
if ($i > ($offset + $limit)) break;
print '<tr class="oddeven"><td>'.$langcode.'</td><td>'.$key.'</td><td>';
print dol_escape_htmltag($val);
print '</td><td class="right">';
print '</td><td class="right nowraponall">';
if (!empty($newlangfileonly->tab_translate[$key]))
{
if ($val != $newlangfileonly->tab_translate[$key])
@ -534,7 +534,7 @@ if ($mode == 'searchkey')
print ' ';
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$conf->entity.'&action=delete">'.img_delete().'</a>';
print '&nbsp;&nbsp;';
$htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]);
$htmltext = $langs->trans("OriginalValueWas", '<i>'.$newlangfileonly->tab_translate[$key].'</i>');
print $form->textwithpicto('', $htmltext, 1, 'info');
}
elseif (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
@ -549,7 +549,7 @@ if ($mode == 'searchkey')
//$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key;
$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key;
print ' &nbsp; <a href="'.$transifexurl.'" target="transifex">'.img_picto('FixOnTransifex', 'globe').'</a>';
print ' &nbsp; <a href="'.$transifexurl.'" target="transifex">'.img_picto($langs->trans('FixOnTransifex'), 'globe').'</a>';
}
}
else

View File

@ -254,15 +254,17 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' &&
if ($tmpmodule != 'api')
$tmpmodule = preg_replace('/api$/i', '', $tmpmodule);
$classfile = str_replace('_', '', $tmpmodule);
if ($module == 'supplierproposals')
// Special cases that does not match name rules conventions
if ($moduleobject == 'supplierproposals')
$classfile = 'supplier_proposals';
if ($module == 'supplierorders')
if ($moduleobject == 'supplierorders')
$classfile = 'supplier_orders';
if ($module == 'supplierinvoices')
if ($moduleobject == 'supplierinvoices')
$classfile = 'supplier_invoices';
if ($module == 'ficheinter')
if ($moduleobject == 'ficheinter')
$classfile = 'interventions';
if ($module == 'interventions')
if ($moduleobject == 'interventions')
$classfile = 'interventions';
$dir_part_file = dol_buildpath('/'.$moduledirforclass.'/class/api_'.$classfile.'.class.php', 0, 2);

View File

@ -6,8 +6,8 @@
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@ -1105,6 +1105,7 @@ if ($action == 'create')
print '<input type="hidden" name="origin" size="10" value="'.GETPOST('origin').'">';
}
$reg = array();
if (GETPOST("datep") && preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$/', GETPOST("datep"), $reg))
{
$object->datep = dol_mktime(0, 0, 0, $reg[2], $reg[3], $reg[1]);

View File

@ -236,6 +236,7 @@ if (empty($reshook))
$outputlangs->setDefaultLang($newlang);
}
$ret = $object->fetch($id); // Reload to get new records
if ($ret > 0) $object->fetch_thirdparty();
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
}
@ -803,6 +804,7 @@ if (empty($reshook))
$outputlangs->setDefaultLang($newlang);
}
$ret = $object->fetch($id); // Reload to get new records
if ($ret > 0) $object->fetch_thirdparty();
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
}
}
@ -1284,6 +1286,7 @@ if (empty($reshook))
$outputlangs->setDefaultLang($newlang);
}
$ret = $object->fetch($id); // Reload to get new records
if ($ret > 0) $object->fetch_thirdparty();
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
}

View File

@ -423,7 +423,7 @@ class Facture extends CommonInvoice
$this->brouillon = 1;
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code);
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $this->date);
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
if (empty($this->fk_multicurrency))
{

View File

@ -53,6 +53,8 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'inv
$socid = GETPOST('socid', 'int');
$socid = GETPOST('socid', 'int');
// Security check
$id = (GETPOST('facid', 'int') ?GETPOST('facid', 'int') : GETPOST('id', 'int'));
$lineid = GETPOST('lineid', 'int');
@ -151,6 +153,11 @@ if ($socid > 0) {
}
if ($socid > 0) {
$tmpthirdparty = new Societe($db);
$res = $tmpthirdparty->fetch($socid);
if ($res > 0) $search_societe = $tmpthirdparty->name;
}
/*
* Actions

View File

@ -94,7 +94,7 @@ print '</td></tr></table></div><br>';
*/
$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.email, s.rowid as socid";
$sql .= " s.nom as name, s.email, s.rowid as socid, s.tva_intra";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,";
$sql .= " ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@ -138,13 +138,14 @@ if ($resql)
$thirdpartystatic->id = $obj->socid;
$thirdpartystatic->name = $obj->name;
$thirdpartystatic->email = $obj->email;
$thirdpartystatic->tva_intra = $obj->tva_intra;
print '<tr class="oddeven"><td>';
print $invoicestatic->getNomUrl(1, 'withdraw');
print '</td>';
print '<td>';
print $thirdpartystatic->getNomUrl(1, 'customer');
print $thirdpartystatic->getNomUrl(1, 'supplier');
print '</td>';
print '<td class="right">';

View File

@ -31,10 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
// Load translation files required by the page
$langs->loadLangs(array('banks', 'categories', 'bills', 'withdrawals'));
if (!$user->rights->prelevement->bons->lire)
accessforbidden();
$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals'));
// Security check
if ($user->socid > 0) accessforbidden();
@ -44,7 +41,6 @@ $action = GETPOST('action', 'alpha');
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$socid = GETPOST('socid', 'int');
$type = GETPOST('type', 'aZ09');
// Load variable for pagination
@ -67,6 +63,13 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
$hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist'));
if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') {
accessforbidden();
}
if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') {
accessforbidden();
}
/*
* Actions
@ -174,7 +177,7 @@ if ($id > 0 || $ref)
}*/
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php'.($object->type != 'bank-transfer' ? '' : '?type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
@ -200,7 +203,7 @@ if ($id > 0 || $ref)
print '<tr><td>'.$langs->trans("TransData").'</td><td>';
print dol_print_date($object->date_trans, 'day');
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>';
print ' <span class="opacitymedium">'.$langs->trans("By").'</span> '.$muser->getFullName($langs).'</td></tr>';
print '<tr><td>'.$langs->trans("TransMetod").'</td><td>';
print $object->methodes_trans[$object->method_trans];
print '</td></tr>';
@ -223,7 +226,9 @@ if ($id > 0 || $ref)
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
print '<tr><td class="titlefield">';
print $langs->trans("BankToReceiveWithdraw");
$labelofbankfield = "BankToReceiveWithdraw";
if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer';
print $langs->trans($labelofbankfield);
print '</td>';
print '<td>';
if ($acc->id > 0)
@ -232,9 +237,13 @@ if ($id > 0 || $ref)
print '</tr>';
print '<tr><td class="titlefield">';
print $langs->trans("WithdrawalFile").'</td><td>';
$labelfororderfield = 'WithdrawalFile';
if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile';
print $langs->trans($labelfororderfield).'</td><td>';
$relativepath = 'receipts/'.$object->ref.'.xml';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
$modulepart = 'prelevement';
if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
print '</td></tr></table>';
print '</div>';

View File

@ -295,6 +295,7 @@ class BonPrelevement extends CommonObject
$sql .= ", p.method_trans, p.fk_user_trans";
$sql .= ", p.date_credit as date_credit";
$sql .= ", p.fk_user_credit";
$sql .= ", p.type";
$sql .= ", p.statut as status";
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
$sql .= " WHERE p.entity IN (".getEntity('invoice').")";
@ -322,6 +323,8 @@ class BonPrelevement extends CommonObject
$this->date_credit = $this->db->jdate($obj->date_credit);
$this->user_credit = $obj->fk_user_credit;
$this->type = $obj->type;
$this->status = $obj->status;
$this->statut = $obj->status; // For backward compatibility
@ -930,14 +933,14 @@ class BonPrelevement extends CommonObject
foreach ($factures as $key => $fac)
{
if ($type != 'bank-transfer') {
$fact = new Facture($this->db);
$tmpinvoice = new Facture($this->db);
} else {
$fact = new FactureFournisseur($this->db);
$tmpinvoice = new FactureFournisseur($this->db);
}
$resfetch = $fact->fetch($fac[0]);
$resfetch = $tmpinvoice->fetch($fac[0]);
if ($resfetch >= 0) // Field 0 of $fac is rowid of invoice
{
if ($soc->fetch($fact->socid) >= 0)
if ($soc->fetch($tmpinvoice->socid) >= 0)
{
$bac = new CompanyBankAccount($this->db);
$bac->fetch(0, $soc->id);
@ -963,9 +966,9 @@ class BonPrelevement extends CommonObject
}
else
{
dol_syslog(__METHOD__."::Check BAN Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$fact->socid." ".$soc->name, LOG_WARNING);
$this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
$this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
dol_syslog(__METHOD__."::Check BAN Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$tmpinvoice->socid." ".$soc->name, LOG_WARNING);
$this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice ".$tmpinvoice->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
$this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice ".$tmpinvoice->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
}
}
else
@ -1142,7 +1145,7 @@ class BonPrelevement extends CommonObject
* Create file of direct debit order or credit transfer into a XML file
*/
dol_syslog(__METHOD__."::Init direct debit file for ".count($factures_prev)." invoices", LOG_DEBUG);
dol_syslog(__METHOD__."::Init direct debit or credit transfer file for ".count($factures_prev)." invoices", LOG_DEBUG);
if (count($factures_prev) > 0)
{
@ -1168,8 +1171,8 @@ class BonPrelevement extends CommonObject
$this->factures = $factures_prev_id;
$this->context['factures_prev'] = $factures_prev;
// Generation of SEPA file $this->filename
// This also the the property $this->total that is included into file
// Generation of direct debit or credti transfer file $this->filename (May be a SEPA file for european countries)
// This also set the property $this->total with amount that is included into file
$result = $this->generate($format, $executiondate, $type);
}
dol_syslog(__METHOD__."::End withdraw receipt, file ".$this->filename, LOG_DEBUG);
@ -1499,8 +1502,110 @@ class BonPrelevement extends CommonObject
$found++;
if ($type == 'bank-transfer') {
print 'TODO';
exit;
/**
* SECTION CREATION FICHIER SEPA - CREDIT TRANSFER
*/
// SEPA Initialisation
$CrLf = "\n";
$now = dol_now();
$dateTime_ECMA = dol_print_date($now, '%Y-%m-%dT%H:%M:%S');
$date_actu = $now;
if (!empty($executiondate)) $date_actu = $executiondate;
$dateTime_YMD = dol_print_date($date_actu, '%Y%m%d');
$dateTime_YMDHMS = dol_print_date($date_actu, '%Y%m%d%H%M%S');
$fileCrediteurSection = '';
$fileEmetteurSection = '';
$i = 0;
/*
* Section Creditor (sepa Crediteurs bloc lines)
*/
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
$sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
$sql .= " f.ref as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum";
$sql .= " FROM";
$sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
$sql .= " ".MAIN_DB_PREFIX."facture_fourn as f,";
$sql .= " ".MAIN_DB_PREFIX."prelevement_facture as pf,";
$sql .= " ".MAIN_DB_PREFIX."societe as soc,";
$sql .= " ".MAIN_DB_PREFIX."c_country as c,";
$sql .= " ".MAIN_DB_PREFIX."societe_rib as rib";
$sql .= " WHERE pl.fk_prelevement_bons = ".$this->id;
$sql .= " AND pl.rowid = pf.fk_prelevement_lignes";
$sql .= " AND pf.fk_facture_fourn = f.rowid";
$sql .= " AND soc.fk_pays = c.rowid";
$sql .= " AND soc.rowid = f.fk_soc";
$sql .= " AND rib.fk_soc = f.fk_soc";
$sql .= " AND rib.default_rib = 1";
$sql .= " AND rib.type = 'ban'";
//print $sql;
// Define $fileCrediteurSection. One section DrctDbtTxInf per invoice.
$resql = $this->db->query($sql);
if ($resql)
{
$num = $this->db->num_rows($resql);
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec);
$fileCrediteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum);
$this->total = $this->total + $obj->somme;
$i++;
}
$nbtotalDrctDbtTxInf = $i;
}
else
{
fputs($this->file, 'ERROR CREDITOR '.$sql.$CrLf); // CREDITORS = Suppliers
$result = -2;
}
// Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all $nbtotalDrctDbtTxInf
if ($result != -2)
{
$fileEmetteurSection .= $this->EnregEmetteurSEPA($conf, $date_actu, $nbtotalDrctDbtTxInf, $this->total, $CrLf, $format);
}
/**
* SECTION CREATION SEPA FILE - CREDTI TRANSFER - ISO200022
*/
// SEPA File Header
fputs($this->file, '<'.'?xml version="1.0" encoding="UTF-8" standalone="yes"?'.'>'.$CrLf);
fputs($this->file, '<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'.$CrLf);
fputs($this->file, ' <CstmrCdtTrfInitn>'.$CrLf);
// SEPA Group header
fputs($this->file, ' <GrpHdr>'.$CrLf);
fputs($this->file, ' <MsgId>'.('CREDTRANS'.$dateTime_YMD.'/REF'.$this->id).'</MsgId>'.$CrLf);
fputs($this->file, ' <CreDtTm>'.$dateTime_ECMA.'</CreDtTm>'.$CrLf);
fputs($this->file, ' <NbOfTxs>'.$i.'</NbOfTxs>'.$CrLf);
fputs($this->file, ' <CtrlSum>'.$this->total.'</CtrlSum>'.$CrLf);
fputs($this->file, ' <InitgPty>'.$CrLf);
fputs($this->file, ' <Nm>'.strtoupper(dol_string_unaccent($this->raison_sociale)).'</Nm>'.$CrLf);
fputs($this->file, ' <Id>'.$CrLf);
fputs($this->file, ' <PrvtId>'.$CrLf);
fputs($this->file, ' <Othr>'.$CrLf);
fputs($this->file, ' <Id>'.$conf->global->PRELEVEMENT_ICS.'</Id>'.$CrLf);
fputs($this->file, ' </Othr>'.$CrLf);
fputs($this->file, ' </PrvtId>'.$CrLf);
fputs($this->file, ' </Id>'.$CrLf);
fputs($this->file, ' </InitgPty>'.$CrLf);
fputs($this->file, ' </GrpHdr>'.$CrLf);
// SEPA File Emetteur (mycompany)
if ($result != -2)
{ fputs($this-> file, $fileEmetteurSection); }
// SEPA File Creditors
if ($result != -2)
{ fputs($this-> file, $fileCrediteurSection); }
// SEPA FILE FOOTER
fputs($this->file, ' </PmtInf>'.$CrLf);
fputs($this->file, ' </CstmrCdtTrfInitn>'.$CrLf);
fputs($this->file, '</Document>'.$CrLf);
} else {
/**
* SECTION CREATION FICHIER SEPA
@ -1566,18 +1671,14 @@ class BonPrelevement extends CommonObject
$result = -2;
}
// Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all DrctDbtTxInf
// Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all $nbtotalDrctDbtTxInf
if ($result != -2)
{
$fileEmetteurSection .= $this->EnregEmetteurSEPA($conf, $date_actu, $nbtotalDrctDbtTxInf, $this->total, $CrLf, $format);
}
else
{
fputs($this->file, 'ERROR CREDITOR'.$CrLf); // CREDITOR = My company
}
/**
* SECTION CREATION SEPA FILE
* SECTION CREATION SEPA FILE - ISO200022
*/
// SEPA File Header
fputs($this->file, '<'.'?xml version="1.0" encoding="UTF-8" standalone="yes"?'.'>'.$CrLf);

View File

@ -104,7 +104,11 @@ if (empty($reshook))
}
else
{
setEventMessages($langs->trans("DirectDebitOrderCreated", $bprev->getNomUrl(1)), null);
if ($type != 'bank-transfer') {
setEventMessages($langs->trans("DirectDebitOrderCreated", $bprev->getNomUrl(1)), null);
} else {
setEventMessages($langs->trans("CreditTransferOrderCreated", $bprev->getNomUrl(1)), null);
}
header("Location: ".DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$bprev->id);
exit;

View File

@ -192,6 +192,14 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$param = '';
$label = 'NewStandingOrder';
$typefilter = '';
if ($type == 'bank-transfer') {
$label = 'NewPaymentByBankTransfer';
$typefilter = 'type='.$type;
}
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php'.($typefilter ? '?'.$typefilter : ''));
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
print '<table class="liste centpercent">';

View File

@ -32,21 +32,21 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
// Load translation files required by the page
$langs->loadLangs(array('banks', 'categories', 'companies', 'withdrawals', 'bills'));
$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals'));
// Securite acces client
if ($user->socid > 0) accessforbidden();
// Get supervariables
$id = GETPOST('id', 'int');
$socid = GETPOST('socid', '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');
$sortorder = GETPOST("sortorder", 'alpha');
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
@ -57,6 +57,17 @@ if (!$sortorder) $sortorder = 'DESC';
$object = new BonPrelevement($db);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
$hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist'));
if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') {
accessforbidden();
}
if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') {
accessforbidden();
}
/*
@ -75,19 +86,17 @@ if ($id > 0 || $ref)
$head = prelevement_prepare_head($object);
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalsReceipts"), -1, 'payment');
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php'.($object->type != 'bank-transfer' ? '' : '?type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">';
print '<table class="border centpercent tableforfield">'."\n";
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
// Status
//print '<tr><td>'.$langs->trans('Status').'</td><td>'.$object->getLibStatut(1).'</td></tr>';
if ($object->date_trans <> 0)
{
@ -119,7 +128,9 @@ if ($id > 0 || $ref)
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
print '<tr><td class="titlefield">';
print $langs->trans("BankToReceiveWithdraw");
$labelofbankfield = "BankToReceiveWithdraw";
if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer';
print $langs->trans($labelofbankfield);
print '</td>';
print '<td>';
if ($acc->id > 0)
@ -128,9 +139,13 @@ if ($id > 0 || $ref)
print '</tr>';
print '<tr><td class="titlefield">';
print $langs->trans("WithdrawalFile").'</td><td>';
$labelfororderfield = 'WithdrawalFile';
if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile';
print $langs->trans($labelfororderfield).'</td><td>';
$relativepath = 'receipts/'.$object->ref.'.xml';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
$modulepart = 'prelevement';
if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
print '</td></tr></table>';
print '</div>';
@ -151,13 +166,25 @@ $sql .= " s.rowid as socid, s.nom as name, pl.statut, pl.amount as amount_reques
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
$sql .= ", ".MAIN_DB_PREFIX."prelevement_lignes as pl";
$sql .= ", ".MAIN_DB_PREFIX."prelevement_facture as pf";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
if ($object->type != 'bank-transfer') {
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
} else {
$sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f";
}
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
$sql .= " WHERE pf.fk_prelevement_lignes = pl.rowid";
$sql .= " AND pl.fk_prelevement_bons = p.rowid";
$sql .= " AND f.fk_soc = s.rowid";
$sql .= " AND pf.fk_facture = f.rowid";
$sql .= " AND f.entity IN (".getEntity('invoice').")";
if ($object->type != 'bank-transfer') {
$sql .= " AND pf.fk_facture = f.rowid";
} else {
$sql .= " AND pf.fk_facture_fourn = f.rowid";
}
if ($object->type != 'bank-transfer') {
$sql .= " AND f.entity IN (".getEntity('invoice').")";
} else {
$sql .= " AND f.entity IN (".getEntity('supplier_invoice').")";
}
if ($object->id > 0) $sql .= " AND p.rowid=".$object->id;
if ($socid) $sql .= " AND s.rowid = ".$socid;
$sql .= $db->order($sortfield, $sortorder);

View File

@ -21,7 +21,7 @@
/**
* \file htdocs/compta/prelevement/fiche-rejet.php
* \ingroup prelevement
* \brief Withdraw reject
* \brief Debit order or credit transfer reject
*/
require '../../main.inc.php';
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
// Load translation files required by the page
$langs->loadLangs(array("banks", "categories", 'withdrawals', 'bills'));
// Securite acces client
// Security check
if ($user->socid > 0) accessforbidden();
// Get supervariables
@ -55,6 +55,15 @@ $pagenext = $page + 1;
$object = new BonPrelevement($db);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') {
accessforbidden();
}
if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') {
accessforbidden();
}
@ -71,7 +80,7 @@ if ($prev_id > 0 || $ref)
$head = prelevement_prepare_head($object);
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalsReceipts"), -1, 'payment');
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php'.($object->type != 'bank-transfer' ? '' : '?type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
@ -83,13 +92,6 @@ if ($prev_id > 0 || $ref)
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
// Status
/*
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td>'.$object->getLibStatut(1).'</td>';
print '</tr>';
*/
if ($object->date_trans <> 0)
{
$muser = new User($db);
@ -120,7 +122,9 @@ if ($prev_id > 0 || $ref)
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
print '<tr><td class="titlefield">';
print $langs->trans("BankToReceiveWithdraw");
$labelofbankfield = "BankToReceiveWithdraw";
if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer';
print $langs->trans($labelofbankfield);
print '</td>';
print '<td>';
if ($acc->id > 0)
@ -129,9 +133,13 @@ if ($prev_id > 0 || $ref)
print '</tr>';
print '<tr><td class="titlefield">';
print $langs->trans("WithdrawalFile").'</td><td>';
$labelfororderfield = 'WithdrawalFile';
if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile';
print $langs->trans($labelfororderfield).'</td><td>';
$relativepath = 'receipts/'.$object->ref.'.xml';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
$modulepart = 'prelevement';
if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
print '</td></tr></table>';
print '</div>';
@ -144,6 +152,7 @@ if ($prev_id > 0 || $ref)
}
}
$rej = new RejetPrelevement($db, $user);
/*

View File

@ -20,7 +20,7 @@
/**
* \file htdocs/compta/prelevement/fiche-stat.php
* \ingroup prelevement
* \brief Prelevement statistics
* \brief Debit order or credit transfer statistics
*/
require '../../main.inc.php';
@ -54,6 +54,17 @@ $pagenext = $page + 1;
$object = new BonPrelevement($db);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') {
accessforbidden();
}
if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') {
accessforbidden();
}
/*
* View
@ -68,7 +79,7 @@ if ($prev_id > 0 || $ref)
$head = prelevement_prepare_head($object);
dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalsReceipts"), -1, 'payment');
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php'.($object->type != 'bank-transfer' ? '' : '?type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
@ -80,13 +91,6 @@ if ($prev_id > 0 || $ref)
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
// Status
/*
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td>'.$object->getLibStatut(1).'</td>';
print '</tr>';
*/
if ($object->date_trans <> 0)
{
$muser = new User($db);
@ -117,7 +121,9 @@ if ($prev_id > 0 || $ref)
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
print '<tr><td class="titlefield">';
print $langs->trans("BankToReceiveWithdraw");
$labelofbankfield = "BankToReceiveWithdraw";
if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer';
print $langs->trans($labelofbankfield);
print '</td>';
print '<td>';
if ($acc->id > 0)
@ -126,9 +132,13 @@ if ($prev_id > 0 || $ref)
print '</tr>';
print '<tr><td class="titlefield">';
print $langs->trans("WithdrawalFile").'</td><td>';
$labelfororderfield = 'WithdrawalFile';
if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile';
print $langs->trans($labelfororderfield).'</td><td>';
$relativepath = 'receipts/'.$object->ref.'.xml';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
$modulepart = 'prelevement';
if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
print '</td></tr></table>';
print '</div>';
@ -137,14 +147,13 @@ if ($prev_id > 0 || $ref)
}
else
{
$langs->load("errors");
print $langs->trans("Error");
dol_print_error($db);
}
/*
* Stats
*/
$ligne = new LignePrelevement($db);
$line = new LignePrelevement($db);
$sql = "SELECT sum(pl.amount), pl.statut";
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
@ -170,7 +179,7 @@ if ($prev_id > 0 || $ref)
print '<tr class="oddeven"><td>';
print $ligne->LibStatut($row[1], 1);
print $line->LibStatut($row[1], 1);
print '</td><td class="right">';
print price($row[0]);

View File

@ -412,8 +412,8 @@ else
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($resql);
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
{
$page = 0;
@ -423,14 +423,14 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql .= $db->plimit($limit + 1, $offset);
$result = $db->query($sql);
if (!$result)
$resql = $db->query($sql);
if (! $resql)
{
dol_print_error($db);
exit;
}
$num = $db->num_rows($result);
$num = $db->num_rows($resql);
$arrayofselected = is_array($toselect) ? $toselect : array();
@ -786,7 +786,7 @@ $i = 0;
$totalarray = array();
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($result);
$obj = $db->fetch_object($resql);
$arraysocialnetworks = (array) json_decode($obj->socialnetworks, true);
$contactstatic->lastname = $obj->lastname;
@ -986,7 +986,7 @@ while ($i < min($num, $limit))
$i++;
}
$db->free($result);
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook

View File

@ -1082,7 +1082,8 @@ abstract class CommonDocGenerator
$parameters = array(
'curY' => &$curY,
'columnText' => $columnText,
'colKey' => $colKey
'colKey' => $colKey,
'pdf' => &$pdf,
);
$reshook = $hookmanager->executeHooks('printStdColumnContent', $parameters, $this); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

View File

@ -1899,14 +1899,15 @@ abstract class CommonObject
$row = $this->db->fetch_row($result);
$this->ref_previous = $row[0];
$sql = "SELECT MIN(te.".$fieldid.")";
$sql .= " FROM ".(empty($nodbprefix) ?MAIN_DB_PREFIX:'').$this->table_element." as te";
if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
$sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug";
}
if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 'fk_soc@societe') $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to entity
elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid
if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) {
$tmparray = explode('@', $this->ismultientitymanaged);
$sql .= ", ".MAIN_DB_PREFIX.$tmparray[1]." as ".($tmparray[1] == 'societe' ? 's' : 'parenttable'); // If we need to link to this table to limit select to entity
} elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid
elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid
if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$aliastablesociete.".rowid = sc.fk_soc";
$sql .= " WHERE te.".$fieldid." > '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists)
@ -1917,8 +1918,10 @@ abstract class CommonObject
if (!preg_match('/^\s*AND/i', $filter)) $sql .= " AND "; // For backward compatibility
$sql .= $filter;
}
if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 'fk_soc@societe') $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to entity
elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid
if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) {
$tmparray = explode('@', $this->ismultientitymanaged);
$sql .= ' AND te.'.$tmparray[0].' = '.($tmparray[1] == 'societe' ? 's' : 'parenttable').'.rowid'; // If we need to link to this table to limit select to entity
} elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid
if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) {
@ -1931,6 +1934,10 @@ abstract class CommonObject
$sql .= ' AND te.entity IN ('.getEntity($this->element).')';
}
}
if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged) && $this->element != 'societe') {
$tmparray = explode('@', $this->ismultientitymanaged);
$sql .= ' AND parenttable.entity IN ('.getEntity($tmparray[1]).')';
}
if ($this->restrictiononfksoc == 1 && $socid && $this->element != 'societe') $sql .= ' AND te.fk_soc = '.$socid;
if ($this->restrictiononfksoc == 2 && $socid && $this->element != 'societe') $sql .= ' AND (te.fk_soc = '.$socid.' OR te.fk_soc IS NULL)';
if ($this->restrictiononfksoc && $socid && $this->element == 'societe') $sql .= ' AND te.rowid = '.$socid;

View File

@ -183,6 +183,8 @@ class DoliDBPgsql extends DoliDB
if ($type == 'dml')
{
$reg = array();
$line = preg_replace('/\s/', ' ', $line); // Replace tabulation with space
// we are inside create table statement so lets process datatypes

View File

@ -721,16 +721,16 @@ function translation_prepare_head()
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=overwrite";
$head[$h][1] = $langs->trans("TranslationOverwriteKey").'<span class="fa fa-plus-circle valignmiddle paddingleft"></span>';
$head[$h][2] = 'overwrite';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=searchkey";
$head[$h][1] = $langs->trans("TranslationKeySearch");
$head[$h][2] = 'searchkey';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=overwrite";
$head[$h][1] = $langs->trans("TranslationOverwriteKey").'<span class="fa fa-plus-circle valignmiddle paddingleft"></span>';
$head[$h][2] = 'overwrite';
$h++;
complete_head_from_modules($conf, $langs, null, $head, $h, 'translation_admin');
complete_head_from_modules($conf, $langs, null, $head, $h, 'translation_admin', 'remove');

View File

@ -1286,7 +1286,7 @@ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = '', $noprin
* @param Conf $conf Object conf
* @param Translate $langs Object langs
* @param DoliDB $db Object db
* @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket|... to list events linked to an object
* @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket... to list events linked to an object
* @param Contact $objcon Filter on object contact to filter events on a contact
* @param int $noprint Return string but does not output it
* @param string $actioncode Filter on actioncode
@ -1294,9 +1294,10 @@ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = '', $noprin
* @param array $filters Filter on other fields
* @param string $sortfield Sort field
* @param string $sortorder Sort order
* @param string $module You can add module name here if elementtype in table llx_actioncomm is objectkey@module
* @return string|void Return html part or void if noprint is 1
*/
function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC')
function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC', $module = '')
{
global $user, $conf;
global $form;
@ -1416,7 +1417,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
}
elseif (is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) && is_array($filterobj->fields['ref']) && $filterobj->table_element && $filterobj->element)
{
$sql .= " AND a.fk_element = o.rowid AND a.elementtype = '".$db->escape($filterobj->element)."'";
// Generic case
$sql .= " AND a.fk_element = o.rowid AND a.elementtype = '".$db->escape($filterobj->element).($module ? '@'.$module : '')."'";
if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id;
}
}

View File

@ -3172,7 +3172,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'setup', 'sign-out', 'split', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top',
'home', 'companies', 'products', 'commercial', 'invoicing', 'preview', 'project', 'projectpub', 'supplier_invoice', 'hrm', 'members', 'ticket', 'generic',
'home', 'hrm', 'companies', 'products', 'commercial', 'invoicing', 'pencil-ruler', 'preview', 'project', 'projectpub', 'supplier_invoice', 'members', 'ticket', 'generic',
'error', 'warning', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda'
)
@ -3195,7 +3195,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd',
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins',
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
'hrm'=>'umbrella-beach', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
'email'=>'at',
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'info-circle',
'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group',
@ -5694,8 +5694,7 @@ function dol_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles = 1)
{
$allowed_tags = array(
"html", "head", "meta", "body", "article", "a", "abbr", "b", "blockquote", "br", "cite", "div", "dl", "dd", "dt", "em", "font", "img", "ins", "hr", "i", "li", "link",
"ol", "p", "q", "s", "section", "span", "strike", "strong", "title",
"table", "tr", "th", "td", "u", "ul"
"ol", "p", "q", "s", "section", "span", "strike", "strong", "title", "table", "tr", "th", "td", "u", "ul", "sup", "sub", "blockquote", "pre", "h1", "h2", "h3", "h4", "h5", "h6"
);
$allowed_tags_string = join("><", $allowed_tags);
$allowed_tags_string = preg_replace('/^>/', '', $allowed_tags_string);

View File

@ -1809,18 +1809,19 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '')
$ret = '';
$regs = array();
// If we ask an resource form external module (instead of default path)
// If we ask a resource form external module (instead of default path)
if (preg_match('/^([^@]+)@([^@]+)$/i', $objecttype, $regs)) {
$myobject = $regs[1];
$module = $regs[2];
}
// Parse $objecttype (ex: project_task)
$module = $myobject = $objecttype;
if (preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs))
{
$module = $regs[1];
$myobject = $regs[2];
else {
// Parse $objecttype (ex: project_task)
$module = $myobject = $objecttype;
if (preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs))
{
$module = $regs[1];
$myobject = $regs[2];
}
}
// Generic case for $classpath
@ -1896,7 +1897,7 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '')
// Generic case for $classfile and $classname
$classfile = strtolower($myobject); $classname = ucfirst($myobject);
//print "objecttype=".$objecttype." module=".$module." subelement=".$subelement." classfile=".$classfile." classname=".$classname;
//print "objecttype=".$objecttype." module=".$module." subelement=".$subelement." classfile=".$classfile." classname=".$classname." classpath=".$classpath;
if ($objecttype == 'invoice_supplier') {
$classfile = 'fournisseur.facture';

View File

@ -65,10 +65,10 @@ function commande_prepare_head(Commande $object)
$head[$h][0] = DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id;
$text = '';
if ($conf->expedition_bon->enabled) $text .= $langs->trans("Shipments");
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text .= '/';
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text .= ' - ';
if ($conf->livraison_bon->enabled) $text .= $langs->trans("Receivings");
if ($nbShipments > 0 || $nbReceiption > 0) $text .= '<span class="badge marginleftonlyshort">'.($nbShipments ? $nbShipments : 0);
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= '/';
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ' - ';
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ($nbReceiption ? $nbReceiption : 0);
if ($nbShipments > 0 || $nbReceiption > 0) $text .= '</span>';
$head[$h][1] = $text;

View File

@ -1859,7 +1859,6 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag
}
if (empty($reshook))
{
if ($object->lines[$i]->special_code == 3) return '';
if (empty($hidedetails) || $hidedetails > 1) $result .= $langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short'));
}
return $result;

View File

@ -39,8 +39,13 @@ function prelevement_prepare_head(BonPrelevement $object)
$h = 0;
$head = array();
$titleoftab = "WithdrawalsReceipts";
if ($object->type == 'bank-transfer') {
$titleoftab = "BankTransferReceipts";
}
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$object->id;
$head[$h][1] = $langs->trans("WithdrawalsReceipts");
$head[$h][1] = $langs->trans($titleoftab);
$head[$h][2] = 'prelevement';
$h++;

View File

@ -40,8 +40,8 @@
* @param float $pu Unit price (HT or TTC selon price_base_type)
* @param float $remise_percent_ligne Discount for line
* @param float $txtva 0=do not apply VAT tax, VAT rate=apply (this is VAT rate only without text code, we don't need text code because we alreaydy have all tax info into $localtaxes_array)
* @param float $uselocaltax1_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
* @param float $uselocaltax2_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
* @param float $uselocaltax1_rate 0=do not use localtax1, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
* @param float $uselocaltax2_rate 0=do not use localtax2, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
* @param float $remise_percent_global 0
* @param string $price_base_type HT=Unit price parameter is HT, TTC=Unit price parameter is TTC
* @param int $info_bits Miscellaneous informations on line

View File

@ -22,7 +22,7 @@
/**
* \file htdocs/core/lib/usergroups.lib.php
* \brief Ensemble de fonctions de base pour la gestion des utilisaterus et groupes
* \brief Set of function to manage users, groups and permissions
*/
/**

View File

@ -29,6 +29,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 101__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/company.php?mainmenu=home&amp;leftmenu=setup', 'MenuCompanySetup', 1, 'admin', '', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 102__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/ihm.php?mainmenu=home&amp;leftmenu=setup', 'GUISetup', 1, 'admin', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 114__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/translation.php?mainmenu=home&amp;leftmenu=setup', 'Translation', 1, 'admin', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/defaultvalues.php?mainmenu=home&amp;leftmenu=setup', 'DefaultValues', 1, 'admin', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 103__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/modules.php?mainmenu=home&amp;leftmenu=setup', 'Modules', 1, 'admin', '', '', 2, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 104__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/boxes.php?mainmenu=home&amp;leftmenu=setup', 'Boxes', 1, 'admin', '', '', 2, 6, __ENTITY__);

View File

@ -131,7 +131,24 @@ if ($action == 'presend')
{
$formmail->fromid = $user->id;
}
$formmail->trackid = $trackid;
if ($object->element === 'facture' && !empty($conf->global->INVOICE_EMAIL_SENDER)) {
$formmail->frommail = $conf->global->INVOICE_EMAIL_SENDER;
$formmail->fromname = '';
$formmail->fromtype = 'special';
}
if ($object->element === 'shipping' && !empty($conf->global->SHIPPING_EMAIL_SENDER)) {
$formmail->frommail = $conf->global->SHIPPING_EMAIL_SENDER;
$formmail->fromname = '';
$formmail->fromtype = 'special';
}
if ($object->element === 'commande' && !empty($conf->global->COMMANDE_EMAIL_SENDER)) {
$formmail->frommail = $conf->global->COMMANDE_EMAIL_SENDER;
$formmail->fromname = '';
$formmail->fromtype = 'special';
}
$formmail->trackid=$trackid;
if (!empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
{
include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';

View File

@ -60,7 +60,7 @@ if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_e
// we keep position for the first line
$totalarray['totalizable'][$key]['pos'] = $totalarray['nbfield'];
}
$totalarray['totalizable'][$key]['total'] += $obj->$tmpkey;
if (is_numeric($obj->$tmpkey)) $totalarray['totalizable'][$key]['total'] += $obj->$tmpkey;
}
if (!empty($val['isameasure']))
{

View File

@ -54,50 +54,48 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
$extrafields_collapse_num = '';
$extrafields_collapse_num_old = '';
$i = 0;
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label)
foreach ($extrafields->attributes[$object->table_element]['label'] as $tmpkeyextra => $tmplabelextra)
{
$i++;
// Discard if extrafield is a hidden field on form
$enabled = 1;
if ($enabled && isset($extrafields->attributes[$object->table_element]['enabled'][$key]))
if ($enabled && isset($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra]))
{
$enabled = dol_eval($extrafields->attributes[$object->table_element]['enabled'][$key], 1);
$enabled = dol_eval($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra], 1);
}
if ($enabled && isset($extrafields->attributes[$object->table_element]['list'][$key]))
if ($enabled && isset($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra]))
{
$enabled = dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1);
$enabled = dol_eval($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra], 1);
}
$perms = 1;
if ($perms && isset($extrafields->attributes[$object->table_element]['perms'][$key]))
if ($perms && isset($extrafields->attributes[$object->table_element]['perms'][$tmpkeyextra]))
{
$perms = dol_eval($extrafields->attributes[$object->table_element]['perms'][$key], 1);
$perms = dol_eval($extrafields->attributes[$object->table_element]['perms'][$tmpkeyextra], 1);
}
//print $key.'-'.$enabled.'-'.$perms.'-'.$label.$_POST["options_" . $key].'<br>'."\n";
//print $tmpkeyextra.'-'.$enabled.'-'.$perms.'-'.$tmplabelextra.$_POST["options_" . $tmpkeyextra].'<br>'."\n";
if (empty($enabled)) continue; // 0 = Never visible field
if (abs($enabled) != 1 && abs($enabled) != 3 && abs($enabled) != 5 && abs($enabled) != 4) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list <> 4 = not visible at the creation
if (empty($perms)) continue; // 0 = Not visible
// Load language if required
if (!empty($extrafields->attributes[$object->table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$object->table_element]['langfile'][$key]);
if (!empty($extrafields->attributes[$object->table_element]['langfile'][$tmpkeyextra])) $langs->load($extrafields->attributes[$object->table_element]['langfile'][$tmpkeyextra]);
if ($action == 'edit_extras')
{
$value = (isset($_POST["options_".$key]) ? $_POST["options_".$key] : $object->array_options["options_".$key]);
}
else
{
$value = $object->array_options["options_".$key];
//var_dump($key.' - '.$value);
$value = (isset($_POST["options_".$tmpkeyextra]) ? $_POST["options_".$tmpkeyextra] : $object->array_options["options_".$tmpkeyextra]);
} else {
$value = $object->array_options["options_".$tmpkeyextra];
//var_dump($tmpkeyextra.' - '.$value);
}
// Print line tr of extra field
if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate')
if ($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra] == 'separate')
{
$extrafields_collapse_num = '';
$extrafield_param = $extrafields->attributes[$object->table_element]['param'][$key];
$extrafield_param = $extrafields->attributes[$object->table_element]['param'][$tmpkeyextra];
if (!empty($extrafield_param) && is_array($extrafield_param)) {
$extrafield_param_list = array_keys($extrafield_param['options']);
@ -105,17 +103,15 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
$extrafield_collapse_display_value = intval($extrafield_param_list[0]);
if ($extrafield_collapse_display_value == 1 || $extrafield_collapse_display_value == 2) {
$extrafields_collapse_num = $extrafields->attributes[$object->table_element]['pos'][$key];
$extrafields_collapse_num = $extrafields->attributes[$object->table_element]['pos'][$tmpkeyextra];
}
}
}
print $extrafields->showSeparator($key, $object);
print $extrafields->showSeparator($tmpkeyextra, $object);
$lastseparatorkeyfound = $key;
}
else
{
$lastseparatorkeyfound = $tmpkeyextra;
} else {
print '<tr class="trextrafields_collapse'.$extrafields_collapse_num;
/*if ($extrafields_collapse_num && $extrafields_collapse_num_old && $extrafields_collapse_num != $extrafields_collapse_num_old) {
print ' trextrafields_collapse_new';
@ -130,10 +126,10 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
print '<tr>';
print '<td class="';
if ((!empty($action) && ($action == 'create' || $action == 'edit')) && !empty($extrafields->attributes[$object->table_element]['required'][$key])) print ' fieldrequired';
if ((!empty($action) && ($action == 'create' || $action == 'edit')) && !empty($extrafields->attributes[$object->table_element]['required'][$tmpkeyextra])) print ' fieldrequired';
print '">';
if (!empty($extrafields->attributes[$object->table_element]['help'][$key])) print $form->textwithpicto($langs->trans($label), $langs->trans($extrafields->attributes[$object->table_element]['help'][$key]));
else print $langs->trans($label);
if (!empty($extrafields->attributes[$object->table_element]['help'][$tmpkeyextra])) print $form->textwithpicto($langs->trans($tmplabelextra), $langs->trans($extrafields->attributes[$object->table_element]['help'][$tmpkeyextra]));
else print $langs->trans($tmplabelextra);
print '</td>';
//TODO Improve element and rights detection
@ -151,54 +147,52 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
if ($object->element == 'mo') $permok = $user->rights->mrp->write;
$isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0));
if (($isdraft || !empty($extrafields->attributes[$object->table_element]['alwayseditable'][$key]))
&& $permok && $enabled != 5 && ($action != 'edit_extras' || GETPOST('attribute') != $key)
&& empty($extrafields->attributes[$object->table_element]['computed'][$key]))
if (($isdraft || !empty($extrafields->attributes[$object->table_element]['alwayseditable'][$tmpkeyextra]))
&& $permok && $enabled != 5 && ($action != 'edit_extras' || GETPOST('attribute') != $tmpkeyextra)
&& empty($extrafields->attributes[$object->table_element]['computed'][$tmpkeyextra]))
{
$fieldid = 'id';
if ($object->table_element == 'societe') $fieldid = 'socid';
print '<td class="right"><a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?'.$fieldid.'='.$object->id.'&action=edit_extras&attribute='.$key.'&ignorecollapsesetup=1">'.img_edit().'</a></td>';
print '<td class="right"><a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?'.$fieldid.'='.$object->id.'&action=edit_extras&attribute='.$tmpkeyextra.'&ignorecollapsesetup=1">'.img_edit().'</a></td>';
}
print '</tr></table>';
print '</td>';
$html_id = !empty($object->id) ? $object->element.'_extras_'.$key.'_'.$object->id : '';
$html_id = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : '';
print '<td id="'.$html_id.'" class="'.$object->element.'_extras_'.$key.' wordbreak"'.($cols ? ' colspan="'.$cols.'"' : '').'>';
print '<td id="'.$html_id.'" class="'.$object->element.'_extras_'.$tmpkeyextra.' wordbreak"'.($cols ? ' colspan="'.$cols.'"' : '').'>';
// Convert date into timestamp format
if (in_array($extrafields->attributes[$object->table_element]['type'][$key], array('date', 'datetime')))
if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date', 'datetime')))
{
$datenotinstring = $object->array_options['options_'.$key];
// print 'X'.$object->array_options['options_' . $key].'-'.$datenotinstring.'x';
if (!is_numeric($object->array_options['options_'.$key])) // For backward compatibility
$datenotinstring = $object->array_options['options_'.$tmpkeyextra];
// print 'X'.$object->array_options['options_' . $tmpkeyextra].'-'.$datenotinstring.'x';
if (!is_numeric($object->array_options['options_'.$tmpkeyextra])) // For backward compatibility
{
$datenotinstring = $db->jdate($datenotinstring);
}
//print 'x'.$object->array_options['options_' . $key].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour');
$value = isset($_POST["options_".$key]) ? dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]) : $datenotinstring;
//print 'x'.$object->array_options['options_' . $tmpkeyextra].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour');
$value = isset($_POST["options_".$tmpkeyextra]) ? dol_mktime($_POST["options_".$tmpkeyextra."hour"], $_POST["options_".$tmpkeyextra."min"], 0, $_POST["options_".$tmpkeyextra."month"], $_POST["options_".$tmpkeyextra."day"], $_POST["options_".$tmpkeyextra."year"]) : $datenotinstring;
}
//TODO Improve element and rights detection
if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'none') == $key)
if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'none') == $tmpkeyextra)
{
$fieldid = 'id';
if ($object->table_element == 'societe') $fieldid = 'socid';
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formextra">';
print '<input type="hidden" name="action" value="update_extras">';
print '<input type="hidden" name="attribute" value="'.$key.'">';
print '<input type="hidden" name="attribute" value="'.$tmpkeyextra.'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="'.$fieldid.'" value="'.$object->id.'">';
print $extrafields->showInputField($key, $value, '', '', '', 0, $object->id, $object->table_element);
print $extrafields->showInputField($tmpkeyextra, $value, '', '', '', 0, $object->id, $object->table_element);
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Modify')).'">';
print '</form>';
}
else
{
//var_dump($key.'-'.$value.'-'.$object->table_element);
print $extrafields->showOutputField($key, $value, '', $object->table_element);
} else {
//var_dump($tmpkeyextra.'-'.$value.'-'.$object->table_element);
print $extrafields->showOutputField($tmpkeyextra, $value, '', $object->table_element);
}
print '</td>';

View File

@ -1542,8 +1542,11 @@ if ($action == 'create')
}
if ($subj == 0) // Line not shown yet, we show it
{
print '<!-- line not shown yet, we show it -->';
print '<tr class="oddeven"><td colspan="3" ></td><td class="center">';
$warehouse_selected_id = GETPOST('entrepot_id', 'int');
print '<!-- line not shown yet, we show it -->';
print '<tr class="oddeven"><td colspan="3"></td><td class="center">';
if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
$disabled = '';
@ -1551,6 +1554,9 @@ if ($action == 'create')
{
$disabled = 'disabled="disabled"';
}
if ($warehouse_selected_id <= 0) { // We did not force a given warehouse, so we won't have no warehouse to change qty.
$disabled = 'disabled="disabled"';
}
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled ? ' '.$disabled : '').'> ';
}
else
@ -1562,7 +1568,6 @@ if ($action == 'create')
print '<td class="left">';
if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
$warehouse_selected_id = GETPOST('entrepot_id', 'int');
if ($warehouse_selected_id > 0)
{
$warehouseObject = new Entrepot($db);
@ -1949,7 +1954,7 @@ elseif ($id || $ref)
print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
print '<table class="border centpercent tableforfield">';
// Sending method
print '<tr><td height="10">';

View File

@ -292,6 +292,7 @@ class Expedition extends CommonObject
$this->db->begin();
$sql = "INSERT INTO ".MAIN_DB_PREFIX."expedition (";
$sql .= "ref";
$sql .= ", entity";
$sql .= ", ref_customer";
@ -331,10 +332,10 @@ class Expedition extends CommonObject
$sql .= ", ".($this->fk_delivery_address > 0 ? $this->fk_delivery_address : "null");
$sql .= ", ".($this->shipping_method_id > 0 ? $this->shipping_method_id : "null");
$sql .= ", '".$this->db->escape($this->tracking_number)."'";
$sql .= ", ".$this->weight;
$sql .= ", ".$this->sizeS; // TODO Should use this->trueDepth
$sql .= ", ".$this->sizeW; // TODO Should use this->trueWidth
$sql .= ", ".$this->sizeH; // TODO Should use this->trueHeight
$sql.= ", ".(is_numeric($this->weight)?$this->weight:'NULL');
$sql.= ", ".(is_numeric($this->sizeS)?$this->sizeS:'NULL'); // TODO Should use this->trueDepth
$sql.= ", ".(is_numeric($this->sizeW)?$this->sizeW:'NULL'); // TODO Should use this->trueWidth
$sql.= ", ".(is_numeric($this->sizeH)?$this->sizeH:'NULL'); // TODO Should use this->trueHeight
$sql .= ", ".($this->weight_units != '' ? (int) $this->weight_units : 'NULL');
$sql .= ", ".($this->size_units != '' ? (int) $this->size_units : 'NULL');
$sql .= ", ".(!empty($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null");

View File

@ -332,9 +332,11 @@ class CommandeFournisseur extends CommonOrder
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as p ON c.fk_mode_reglement = p.id";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_input_method as cm ON cm.rowid = c.fk_input_method";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';
$sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
if (empty($id)) $sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
else $sql .= " WHERE c.rowid=".$id;
if ($ref) $sql .= " AND c.ref='".$this->db->escape($ref)."'";
else $sql .= " AND c.rowid=".$id;
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$resql = $this->db->query($sql);
@ -1292,11 +1294,15 @@ class CommandeFournisseur extends CommonOrder
$error = 0;
$now = dol_now();
// $date_commande is deprecated
$date = ($this->date_commande ? $this->date_commande : $this->date); // in case of date is set
if(empty($date)) $date = $now;
// Clean parameters
if (empty($this->source)) $this->source = 0;
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code);
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $date);
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
if (empty($this->fk_multicurrency))
{

View File

@ -359,7 +359,7 @@ class FactureFournisseur extends CommonInvoice
$remise = $this->remise;
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code);
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $this->date);
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
if (empty($this->fk_multicurrency))
{
@ -486,7 +486,7 @@ class FactureFournisseur extends CommonInvoice
$idligne,
$this->lines[$i]->description,
$this->lines[$i]->pu_ht,
$this->lines[$i]->tva_tx,
$this->lines[$i]->tva_tx.($this->lines[$i]->vat_src_code ? ' ('.$this->lines[$i]->vat_src_code.')' : ''),
$this->lines[$i]->localtax1_tx,
$this->lines[$i]->localtax2_tx,
$this->lines[$i]->qty,
@ -1945,6 +1945,8 @@ class FactureFournisseur extends CommonInvoice
$localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $mysoc, $this->thirdparty);
$reg = array();
// Clean vat code
$vat_src_code = '';
if (preg_match('/\((.*)\)/', $vatrate, $reg))
@ -2648,6 +2650,8 @@ class FactureFournisseur extends CommonInvoice
$object->id = 0;
$object->statut = self::STATUS_DRAFT;
$object->fetch_thirdparty(); // We need it to recalculate VAT localtaxes according to main sale taxes and vendor
// Clear fields
$object->ref_supplier = (empty($this->ref_supplier) ? $langs->trans("CopyOf").' '.$object->ref_supplier : $this->ref_supplier);
$object->author = $user->id;

View File

@ -1025,7 +1025,7 @@ class ProductFournisseur extends Product
//$out .= '<td class="liste_titre right">'.$langs->trans("QtyMin").'</td>';
$out .= '<td class="liste_titre">'.$langs->trans("User").'</td></tr>';
foreach ($productFournLogList as $productFournLog) {
$out .= '<tr><td class="right">'.dol_print_date($this->db->jdate($productFournLog['datec']), 'dayhour', 'tzuser').'</td>';
$out .= '<tr><td class="right">'.dol_print_date($productFournLog['datec'], 'dayhour', 'tzuser').'</td>';
$out .= '<td class="right">'.price($productFournLog['price']).'</td>';
//$out.= '<td class="right">'.$productFournLog['quantity'].'</td>';
$out .= '<td>'.$productFournLog['lastname'].'</td></tr>';

View File

@ -2390,7 +2390,7 @@ elseif (!empty($object->id))
{
if ($user->rights->fournisseur->commande->approuver)
{
if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $conf->global->MAIN_FEATURES_LEVEL > 0 && $object->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED && !empty($object->user_approve_id))
if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $object->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED && !empty($object->user_approve_id))
{
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("FirstApprovalAlreadyDone")).'">'.$langs->trans("ApproveOrder").'</a>';
}
@ -2406,7 +2406,7 @@ elseif (!empty($object->id))
}
// Second approval (if option SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set)
if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $conf->global->MAIN_FEATURES_LEVEL > 0 && $object->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)
if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $object->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)
{
if ($object->statut == CommandeFournisseur::STATUS_VALIDATED)
{

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005 Marc Barilley <marc@ocebo.fr>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>

View File

@ -268,7 +268,7 @@ else
print '<td class="liste_titre"></td>';
// Action column
print '<td class="liste_titre maxwidthsearch">';
print '<td class="liste_titre maxwidthsearch center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';

View File

@ -77,7 +77,7 @@ $childids[] = $user->id;
llxHeader('', $langs->trans('HRMArea'));
print load_fiche_titre($langs->trans("HRMArea"), '', 'user');
print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm');
if (!empty($setupcompanynotcomplete))

View File

@ -409,12 +409,11 @@ if (typeof(PhpDebugBar) == 'undefined') {
className: "phpdebugbar " + csscls('minimized'),
options: {
bodyMarginBottom: true,
bodyMarginBottomHeight: parseInt($('body').css('margin-bottom'))
},
initialize: function() {
this.options = {
bodyMarginBottom: true,
bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')),
};
this.controls = {};
this.dataMap = {};
this.datasets = {};

View File

@ -329,3 +329,5 @@ ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_de
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (721, 72, '0','0','VAT Rate 0',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (722, 72, '18','0', '0.9', '1', 'VAT Rate 18+0.9', 1);
ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0;

View File

@ -36,4 +36,4 @@ CREATE TABLE llx_c_format_cards
custom_x double(24,8) NOT NULL,
custom_y double(24,8) NOT NULL,
active integer NOT NULL
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -37,5 +37,5 @@ CREATE TABLE llx_establishment (
datec datetime NOT NULL,
tms timestamp NOT NULL,
status tinyint DEFAULT 1
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -23,5 +23,5 @@ CREATE TABLE llx_expeditiondet_batch (
batch varchar(128) DEFAULT NULL,
qty double NOT NULL DEFAULT '0',
fk_origin_stock integer NOT NULL
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -31,4 +31,4 @@ CREATE TABLE llx_expensereport_rules (
code_expense_rules_type varchar(50) NOT NULL,
is_for_all tinyint DEFAULT 0,
entity integer DEFAULT 1
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -35,4 +35,4 @@ CREATE TABLE llx_inventory
date_validation datetime DEFAULT NULL,
import_key varchar(14) -- import key
)
ENGINE=InnoDB;
ENGINE=innodb;

View File

@ -30,4 +30,4 @@ qty_stock double DEFAULT NULL, -- The targeted value. can be filled during dra
qty_view double DEFAULT NULL, -- must be filled once regulation is done
qty_regulated double DEFAULT NULL -- must be filled once regulation is done
)
ENGINE=InnoDB;
ENGINE=innodb;

View File

@ -22,4 +22,4 @@ CREATE TABLE llx_oauth_state (
fk_user integer,
fk_adherent integer,
entity integer DEFAULT 1
)ENGINE=InnoDB;
)ENGINE=innodb;

View File

@ -24,4 +24,4 @@ CREATE TABLE llx_oauth_token (
fk_user integer,
fk_adherent integer,
entity integer DEFAULT 1
)ENGINE=InnoDB;
)ENGINE=innodb;

View File

@ -21,5 +21,5 @@ CREATE TABLE llx_opensurvey_comments (
comment text NOT NULL,
tms timestamp,
usercomment text
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -20,5 +20,5 @@ CREATE TABLE llx_opensurvey_formquestions (
id_sondage VARCHAR(16),
question TEXT,
available_answers TEXT -- List of available answers
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -31,4 +31,4 @@ CREATE TABLE llx_opensurvey_sondage (
allow_spy tinyint NOT NULL DEFAULT 1,
tms TIMESTAMP,
sujet TEXT -- Not filled if format = 'F'. Question are into table llx_opensurvey_formquestions
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -19,4 +19,4 @@ CREATE TABLE llx_opensurvey_user_formanswers (
fk_user_survey INTEGER NOT NULL,
fk_question INTEGER NOT NULL,
reponses TEXT
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -21,4 +21,4 @@ CREATE TABLE llx_opensurvey_user_studs (
id_sondage VARCHAR(16) NOT NULL,
reponses VARCHAR(100) NOT NULL, -- Not used for 'F' surveys
tms timestamp
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -27,5 +27,5 @@ CREATE TABLE llx_product_batch (
batch varchar(128) NOT NULL,
qty double NOT NULL DEFAULT 0,
import_key varchar(14) DEFAULT NULL
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -29,4 +29,4 @@ CREATE TABLE llx_product_lot (
fk_user_creat integer,
fk_user_modif integer,
import_key integer
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -24,5 +24,5 @@ CREATE TABLE llx_propal_merge_pdf_product (
datec datetime NOT NULL,
tms timestamp NOT NULL,
import_key varchar(14) DEFAULT NULL
) ENGINE=InnoDB;
) ENGINE=innodb;

View File

@ -58,6 +58,7 @@ CREATE OR REPLACE FUNCTION dol_util_triggerall(DoEnable boolean) RETURNS integer
-- Add triggers for timestamp fields named tms
CREATE OR REPLACE FUNCTION update_modified_column_tms() RETURNS TRIGGER AS $$ BEGIN NEW.tms = now(); RETURN NEW; END; $$ LANGUAGE plpgsql;
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_accounting_account FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_accounting_fiscalyear FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_actioncomm FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
@ -127,6 +128,9 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_localtax FOR EACH RO
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_mailing FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_mailing_cibles FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_menu FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_mrp_mo FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_mrp_mo_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_mrp_production FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_notify FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_notify_def FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_opensurvey_comments FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();

View File

@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o
UserEmail=User email
CompanyEmail=Company Email
FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally.
FixOnTransifex=Fix the translation on the online translation platform of project
SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory <b>langs/%s</b> and submit your change to www.transifex.com/dolibarr-association/dolibarr/
SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr.
SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr
ModuleSetup=Module setup
ModulesSetup=Modules/Application setup
ModuleFamilyBase=System
@ -1686,7 +1687,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view
##### Clicktodial #####
ClickToDialSetup=Click To Dial module setup
ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with clicktodial login (defined on user card)<br><b>__PASS__</b> that will be replaced with clicktodial password (defined on user card).
ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example.
ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable.
ClickToDialUseTelLink=Use just a link "tel:" on phone numbers
ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field.
##### Point Of Sale (CashDesk) #####

View File

@ -1037,4 +1037,5 @@ ShowOtherLanguages=Show other languages
SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for this language
NotUsedForThisCustomer=Not used for this customer
AmountMustBePositive=Amount must be positive
ByStatus=By status
ByStatus=By status
InformationMessage=Information

View File

@ -77,12 +77,12 @@ StatusMotif8=Other reason
CreateForSepaFRST=Create direct debit file (SEPA FRST)
CreateForSepaRCUR=Create direct debit file (SEPA RCUR)
CreateAll=Create direct debit file (all)
CreateFileForPaymentByBankTransfer=Create credit transfer (all)
CreateFileForPaymentByBankTransfer=Create file for credit transfer (all)
CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA)
CreateGuichet=Only office
CreateBanque=Only bank
OrderWaiting=Waiting for treatment
NotifyTransmision=Withdrawal Transmission
NotifyTransmision=File transmission
NotifyCredit=Withdrawal Credit
NumeroNationalEmetter=National Transmitter Number
WithBankUsingRIB=For bank accounts using RIB
@ -95,7 +95,8 @@ 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->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null.
DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null.
WithdrawalFile=Withdrawal file
WithdrawalFile=Debit order file
CreditTransferFile=Credit transfer 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
StatisticsByLineStatus=Statistics by status of lines
@ -121,6 +122,7 @@ SEPAFrstOrRecur=Type of payment
ModeRECUR=Recurring payment
ModeFRST=One-off payment
PleaseCheckOne=Please check one only
CreditTransferOrderCreated=Credit transfer order %s created
DirectDebitOrderCreated=Direct debit order %s created
AmountRequested=Amount requested
SEPARCUR=SEPA CUR

View File

@ -68,7 +68,7 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_valu
print load_fiche_titre($langs->trans("MyModuleSetup"), $linkback, 'title_setup');
$head = mymoduleAdminPrepareHead(null);
$head = mymoduleAdminPrepareHead();
dol_fiche_head($head, 'myobject_extrafields', $langs->trans("MyObjectExtraFields"), -1, 'account');

View File

@ -840,7 +840,7 @@ class MyObject extends CommonObject
if (empty($this->labelStatus) || empty($this->labelStatusShort))
{
global $langs;
//$langs->load("mymodule");
//$langs->load("mymodule@mymodule");
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft');
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
$this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled');
@ -953,7 +953,7 @@ class MyObject extends CommonObject
public function getNextNumRef()
{
global $langs, $conf;
$langs->load("mymodule@myobject");
$langs->load("mymodule@mymodule");
if (empty($conf->global->MYMODULE_MYOBJECT_ADDON)) {
$conf->global->MYMODULE_MYOBJECT_ADDON = 'mod_myobject_standard';

View File

@ -147,7 +147,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
$this->db = $db;
$this->name = "standard";
$this->description = $langs->trans('PDFStandardDescription');
$this->description = $langs->trans('DocumentModelStandardPDF');
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
// Dimension page

View File

@ -249,7 +249,7 @@ if ($object->id > 0)
$filters['search_agenda_label'] = $search_agenda_label;
// TODO Replace this with same code than into list.php
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder);
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, 'mymmodule');
}
}

View File

@ -589,7 +589,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright);
$somethingshown = $formactions->showactions($object, $object->element.'@mymodule', (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright);
print '</div></div></div>';
}

View File

@ -519,6 +519,7 @@ class MultiCurrency extends CommonObject
global $conf;
$sql1 = 'SELECT m.rowid, mc.rate FROM '.MAIN_DB_PREFIX.'multicurrency m';
$sql1 .= ' LEFT JOIN '.MAIN_DB_PREFIX.'multicurrency_rate mc ON (m.rowid = mc.fk_multicurrency)';
$sql1 .= " WHERE m.code = '".$db->escape($code)."'";
$sql1 .= " AND m.entity IN (".getEntity('multicurrency').")";
@ -527,7 +528,7 @@ class MultiCurrency extends CommonObject
$tmparray = dol_getdate($date_document);
$sql2 .= " AND mc.date_sync <= '".$db->idate(dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year'], true))."'";
}
$sql3 .= ' ORDER BY mc.date_sync DESC LIMIT 1';
$sql3 = ' ORDER BY mc.date_sync DESC LIMIT 1';
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $db->query($sql1.$sql2.$sql3);

View File

@ -204,7 +204,7 @@ if ($id > 0 || !empty($ref))
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
print_liste_field_titre("DatePropal", $_SERVER["PHP_SELF"], "p.datep", "", $option, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "p.total", "", $option, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
print "</tr>\n";

View File

@ -114,6 +114,7 @@ class Entrepot extends CommonObject
*/
public $fields = array(
'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>10),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>15),
'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'showoncombobox'=>1, 'position'=>25),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>30),
'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-2, 'position'=>35),
@ -456,6 +457,7 @@ class Entrepot extends CommonObject
}
$sql = "SELECT rowid, fk_parent, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id, phone, fax";
$sql .= ", entity";
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot";
if ($id)
{
@ -475,6 +477,7 @@ class Entrepot extends CommonObject
$obj = $this->db->fetch_object($result);
$this->id = $obj->rowid;
$this->entity = $obj->entity;
$this->fk_parent = $obj->fk_parent;
$this->ref = $obj->label;
$this->label = $obj->label;

View File

@ -226,13 +226,13 @@ if (!empty($conf->categorie->enabled))
}
foreach ($search as $key => $val)
{
if ($key == 'status' && $search[$key] == -1) continue;
if (($key == 'status' && $search[$key] == -1) || $key=='entity') continue;
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
if (strpos($object->fields[$key]['type'], 'integer:') === 0) {
if ($search[$key] == '-1') $search[$key] = '';
$mode_search = 2;
}
if ($search[$key] != '') $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search));
if ($search[$key] != '') $sql .= natural_search((($key == 'ref') ? 't.ref' : $key), $search[$key], (($key == 'status') ? 2 : $mode_search));
}
if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
// Add where from extra fields

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -1 +0,0 @@

View File

@ -2044,7 +2044,7 @@ else
print '</span>';
}
print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '</tr><tr>';
print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>';
print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1);
if (!isOnlyOneLocalTax(2))

View File

@ -897,7 +897,7 @@ class SupplierProposal extends CommonObject
}
// Multicurrency
if (!empty($this->multicurrency_code)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code);
if (!empty($this->multicurrency_code)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $now);
if (empty($this->fk_multicurrency))
{
$this->multicurrency_code = $conf->currency;

View File

@ -381,12 +381,18 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO =
height: 0;
}
.info-box-title {
width: calc(100% - 20px);
}
.info-box-module {
min-width: 350px;
max-width: 350px;
}
.info-box-title {
width: calc(100% - 20px);
@media only screen and (max-width: 1740px) {
.info-box-module {
min-width: 315px;
max-width: 315px;
}
}
@media only screen and (max-width: 767px) {
.info-box-module {

View File

@ -147,7 +147,7 @@ button.dropdown-item.global-search-item {
* MENU Dropdown
*/
.login_block.usedropdown .logout-btn{
display: none;
/* display: none; */
}
.tmenu .open.dropdown, .tmenu .open.dropdown {

View File

@ -439,6 +439,18 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO =
min-width: 350px;
max-width: 350px;
}
@media only screen and (max-width: 1740px) {
.info-box-module {
min-width: 315px;
max-width: 315px;
}
}
@media only screen and (max-width: 767px) {
.info-box-module {
min-width: 260px;
}
}
.info-box-module .info-box-content {
height: 6.3em;
}

View File

@ -164,7 +164,7 @@ if ($id > 0)
}
else
{
print $form->textwithpicto((empty($object->clicktodial_url) ? $langs->trans("DefaultLink").': ' : '').$url, $langs->trans("ClickToDialUrlDesc"));
print $form->textwithpicto((empty($object->clicktodial_url) ? '<span class="opacitymedium">'.$langs->trans("DefaultLink").':</span> ' : '').$url, $langs->trans("ClickToDialUrlDesc"));
}
print '</td>';
print '</tr>';

View File

@ -164,7 +164,10 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase
continue;
print 'Check sql file '.$file."\n";
$filecontent=file_get_contents($dir.'/'.$file);
$filecontent = file_get_contents($dir.'/'.$file);
// Allow ` for 'rank' column name
$filecontent = str_replace('`rank`', '_rank_', $filecontent);
$result=strpos($filecontent, '`');
print __METHOD__." Result for checking we don't have back quote = ".$result."\n";