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 img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
} else {
|
} 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 img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -215,8 +215,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
|||||||
|
|
||||||
if ($_POST["optionlocaltax1"] == "localtax1on")
|
if ($_POST["optionlocaltax1"] == "localtax1on")
|
||||||
{
|
{
|
||||||
if (!isset($_REQUEST['lt1']))
|
if (!GETPOSTISSET('lt1')) {
|
||||||
{
|
|
||||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", 0, 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", 0, 'chaine', 0, '', $conf->entity);
|
||||||
} else {
|
} else {
|
||||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1', 'aZ09'), 'chaine', 0, '', $conf->entity);
|
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 ($_POST["optionlocaltax2"] == "localtax2on")
|
||||||
{
|
{
|
||||||
if (!isset($_REQUEST['lt2']))
|
if (!GETPOSTISSET('lt2')) {
|
||||||
{
|
|
||||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", 0, 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", 0, 'chaine', 0, '', $conf->entity);
|
||||||
} else {
|
} else {
|
||||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2', 'aZ09'), 'chaine', 0, '', $conf->entity);
|
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)
|
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();
|
$db->commit();
|
||||||
} else {
|
} else {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
|
|||||||
@ -799,11 +799,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$keycode = $listfieldvalue[$i];
|
$keycode = $listfieldvalue[$i];
|
||||||
if (empty($keycode)) $keycode = $value;
|
if (empty($keycode)) $keycode = $value;
|
||||||
|
|
||||||
if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
|
if ($value == 'price' || preg_match('/^amount/i', $value)) {
|
||||||
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
|
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||||
} elseif ($value == 'entity') {
|
}
|
||||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
elseif ($value == 'taux' || $value == 'localtax1' || $value == 'localtax2') {
|
||||||
}
|
$_POST[$keycode] = price2num(GETPOST($keycode), 8);
|
||||||
|
}
|
||||||
|
elseif ($value == 'entity') {
|
||||||
|
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($i) $sql .= ",";
|
if ($i) $sql .= ",";
|
||||||
|
|
||||||
@ -823,11 +827,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
}
|
}
|
||||||
$sql .= ",1)";
|
$sql .= ",1)";
|
||||||
|
|
||||||
dol_syslog("actionadd", LOG_DEBUG);
|
dol_syslog("actionadd", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) // Add is ok
|
if ($result) // Add is ok
|
||||||
{
|
{
|
||||||
setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs');
|
setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs');
|
||||||
|
|
||||||
// Clean $_POST array, we keep only id of dictionary
|
// Clean $_POST array, we keep only id of dictionary
|
||||||
if ($id == 10 && GETPOST('country', 'int') > 0) {
|
if ($id == 10 && GETPOST('country', 'int') > 0) {
|
||||||
@ -862,11 +866,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$keycode = $listfieldvalue[$i];
|
$keycode = $listfieldvalue[$i];
|
||||||
if (empty($keycode)) $keycode = $field;
|
if (empty($keycode)) $keycode = $field;
|
||||||
|
|
||||||
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
|
if ($field == 'price' || preg_match('/^amount/i', $field)) {
|
||||||
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
|
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||||
} elseif ($field == 'entity') {
|
}
|
||||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
elseif ($field == 'taux' || $field == 'localtax1' || $field == 'localtax2') {
|
||||||
}
|
$_POST[$keycode] = price2num(GETPOST($keycode), 8);
|
||||||
|
}
|
||||||
|
elseif ($field == 'entity') {
|
||||||
|
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($i) $sql .= ",";
|
if ($i) $sql .= ",";
|
||||||
$sql .= $field."=";
|
$sql .= $field."=";
|
||||||
|
|||||||
@ -416,7 +416,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
if (function_exists('imap_open'))
|
if (function_exists('imap_open'))
|
||||||
{
|
{
|
||||||
$connectstringserver = $object->getConnectStringIMAP();
|
// Note: $object->host has been loaded by the fetch
|
||||||
|
$usessl = 1;
|
||||||
|
|
||||||
|
$connectstringserver = $object->getConnectStringIMAP($usessl);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($sourcedir) {
|
if ($sourcedir) {
|
||||||
|
|||||||
@ -640,7 +640,11 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS');
|
$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
|
// Extrafields
|
||||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
|
|||||||
@ -749,7 +749,7 @@ if ($action != 'new')
|
|||||||
if ($object->statut == 1)
|
if ($object->statut == 1)
|
||||||
{
|
{
|
||||||
$filename = dol_sanitizeFileName($object->ref);
|
$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;
|
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||||
|
|
||||||
print $formfile->showdocuments('remisecheque', $filename, $filedir, $urlsource, 1, 1);
|
print $formfile->showdocuments('remisecheque', $filename, $filedir, $urlsource, 1, 1);
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
// Load traductions files required by page
|
// Load traductions files required by page
|
||||||
$outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta"));
|
$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))
|
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';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||||
$productfourn = new ProductFournisseur($this->db);
|
$productfourn = new ProductFournisseur($this->db);
|
||||||
|
|||||||
@ -202,7 +202,6 @@ class EmailCollector extends CommonObject
|
|||||||
|
|
||||||
public $debuginfo;
|
public $debuginfo;
|
||||||
|
|
||||||
|
|
||||||
const STATUS_DISABLED = 0;
|
const STATUS_DISABLED = 0;
|
||||||
const STATUS_ENABLED = 1;
|
const STATUS_ENABLED = 1;
|
||||||
|
|
||||||
@ -716,11 +715,15 @@ class EmailCollector extends CommonObject
|
|||||||
|
|
||||||
// Connect to IMAP
|
// Connect to IMAP
|
||||||
$flags = '/service=imap'; // 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 .= '/novalidate-cert';
|
||||||
//$flags.='/readonly';
|
//$flags.='/readonly';
|
||||||
//$flags.='/debug';
|
//$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.'}';
|
$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');
|
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">';
|
$morehtmlref = '<div class="refidno">';
|
||||||
// Ref supplier
|
// Ref supplier
|
||||||
|
|||||||
@ -67,7 +67,7 @@ $head = facturefourn_prepare_head($object);
|
|||||||
$titre = $langs->trans('SupplierInvoice');
|
$titre = $langs->trans('SupplierInvoice');
|
||||||
print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
|
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">';
|
$morehtmlref = '<div class="refidno">';
|
||||||
// Ref supplier
|
// 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_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);
|
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