Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/commande/card.php
This commit is contained in:
commit
401b4f641d
@ -400,7 +400,7 @@ if ($conf->product->enabled)
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducto&token='.newToken().'&value='.urlencode($file).'">';
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&token='.newToken().'&value='.urlencode($file).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
@ -215,8 +215,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
|
||||
if ($_POST["optionlocaltax1"] == "localtax1on")
|
||||
{
|
||||
if (!isset($_REQUEST['lt1']))
|
||||
{
|
||||
if (!GETPOSTISSET('lt1')) {
|
||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", 0, 'chaine', 0, '', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1', 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
@ -225,8 +224,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
}
|
||||
if ($_POST["optionlocaltax2"] == "localtax2on")
|
||||
{
|
||||
if (!isset($_REQUEST['lt2']))
|
||||
{
|
||||
if (!GETPOSTISSET('lt2')) {
|
||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", 0, 'chaine', 0, '', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2', 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
@ -236,7 +234,9 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
if (GETPOST('save')) { // To avoid to show message when we juste switch the country that resubmit the form.
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
$db->commit();
|
||||
} else {
|
||||
$db->rollback();
|
||||
|
||||
@ -799,11 +799,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$keycode = $listfieldvalue[$i];
|
||||
if (empty($keycode)) $keycode = $value;
|
||||
|
||||
if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
|
||||
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
|
||||
} elseif ($value == 'entity') {
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
if ($value == 'price' || preg_match('/^amount/i', $value)) {
|
||||
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||
}
|
||||
elseif ($value == 'taux' || $value == 'localtax1' || $value == 'localtax2') {
|
||||
$_POST[$keycode] = price2num(GETPOST($keycode), 8);
|
||||
}
|
||||
elseif ($value == 'entity') {
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
|
||||
if ($i) $sql .= ",";
|
||||
|
||||
@ -823,11 +827,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
$sql .= ",1)";
|
||||
|
||||
dol_syslog("actionadd", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) // Add is ok
|
||||
{
|
||||
setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs');
|
||||
dol_syslog("actionadd", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) // Add is ok
|
||||
{
|
||||
setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs');
|
||||
|
||||
// Clean $_POST array, we keep only id of dictionary
|
||||
if ($id == 10 && GETPOST('country', 'int') > 0) {
|
||||
@ -862,11 +866,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$keycode = $listfieldvalue[$i];
|
||||
if (empty($keycode)) $keycode = $field;
|
||||
|
||||
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
|
||||
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
|
||||
} elseif ($field == 'entity') {
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
if ($field == 'price' || preg_match('/^amount/i', $field)) {
|
||||
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||
}
|
||||
elseif ($field == 'taux' || $field == 'localtax1' || $field == 'localtax2') {
|
||||
$_POST[$keycode] = price2num(GETPOST($keycode), 8);
|
||||
}
|
||||
elseif ($field == 'entity') {
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
|
||||
if ($i) $sql .= ",";
|
||||
$sql .= $field."=";
|
||||
|
||||
@ -416,7 +416,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
if (function_exists('imap_open'))
|
||||
{
|
||||
$connectstringserver = $object->getConnectStringIMAP();
|
||||
// Note: $object->host has been loaded by the fetch
|
||||
$usessl = 1;
|
||||
|
||||
$connectstringserver = $object->getConnectStringIMAP($usessl);
|
||||
|
||||
try {
|
||||
if ($sourcedir) {
|
||||
|
||||
@ -640,7 +640,11 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS');
|
||||
$remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef), 2) : 0);
|
||||
|
||||
$remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0);
|
||||
if (empty($remise_percent)) {
|
||||
$remise_percent = 0;
|
||||
}
|
||||
|
||||
// Extrafields
|
||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||
|
||||
@ -749,7 +749,7 @@ if ($action != 'new')
|
||||
if ($object->statut == 1)
|
||||
{
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $dir.get_exdir($object->ref, 0, 1, 0, $object, 'cheque').dol_sanitizeFileName($object->ref);
|
||||
$filedir = $dir.get_exdir($object->ref, 0, 1, 0, $object, 'checkdeposits');
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
|
||||
print $formfile->showdocuments('remisecheque', $filename, $filedir, $urlsource, 1, 1);
|
||||
|
||||
@ -101,7 +101,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta"));
|
||||
|
||||
$dir = $_dir."/".get_exdir($number, 0, 1, 0, $object, 'cheque').$number;
|
||||
$dir = $_dir."/".get_exdir($number, 0, 1, 0, $object, 'checkdeposits');
|
||||
|
||||
if (!is_dir($dir))
|
||||
{
|
||||
|
||||
@ -169,7 +169,7 @@ if (($line->info_bits & 2) == 2) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0)
|
||||
if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0 && empty($conf->global->SUPPLIER_HIDE_SUPPLIER_OBJECTLINES))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productfourn = new ProductFournisseur($this->db);
|
||||
|
||||
@ -202,7 +202,6 @@ class EmailCollector extends CommonObject
|
||||
|
||||
public $debuginfo;
|
||||
|
||||
|
||||
const STATUS_DISABLED = 0;
|
||||
const STATUS_ENABLED = 1;
|
||||
|
||||
@ -716,11 +715,15 @@ class EmailCollector extends CommonObject
|
||||
|
||||
// Connect to IMAP
|
||||
$flags = '/service=imap'; // IMAP
|
||||
if ($ssl) $flags .= '/ssl'; // '/tls'
|
||||
if (!empty($conf->global->IMAP_FORCE_TLS)) {
|
||||
$flags .= '/tls';
|
||||
} elseif (empty($conf->global->IMAP_FORCE_NOSSL)) {
|
||||
if ($ssl) $flags .= '/ssl';
|
||||
}
|
||||
$flags .= '/novalidate-cert';
|
||||
//$flags.='/readonly';
|
||||
//$flags.='/debug';
|
||||
if ($norsh || !empty($conf->global->IMPA_FORCE_NORSH)) $flags .= '/norsh';
|
||||
if ($norsh || !empty($conf->global->IMAP_FORCE_NORSH)) $flags .= '/norsh';
|
||||
|
||||
$connectstringserver = '{'.$this->host.':993'.$flags.'}';
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ if ($id > 0 || !empty($ref))
|
||||
|
||||
print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Ref supplier
|
||||
|
||||
@ -67,7 +67,7 @@ $head = facturefourn_prepare_head($object);
|
||||
$titre = $langs->trans('SupplierInvoice');
|
||||
print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Ref supplier
|
||||
|
||||
@ -578,3 +578,5 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205);
|
||||
|
||||
-- Removed no more used function
|
||||
-- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m CASCADE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user