mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge remote-tracking branch 'upstream/develop' into boxindex
This commit is contained in:
commit
7cd698aff9
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -16,6 +16,7 @@ default.properties
|
|||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
*.orig
|
||||
Thumbs.db
|
||||
/dolibarr_genesis.mp4
|
||||
# Log files
|
||||
|
|
|
|||
44
ChangeLog
44
ChangeLog
|
|
@ -3,6 +3,24 @@ English Dolibarr ChangeLog
|
|||
--------------------------------------------------------------
|
||||
|
||||
|
||||
***** ChangeLog for 14.0.0 compared to 13.0.0 *****
|
||||
|
||||
For users:
|
||||
----------
|
||||
|
||||
|
||||
For developers:
|
||||
---------------
|
||||
|
||||
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
|
||||
|
||||
For users:
|
||||
|
|
@ -96,9 +114,6 @@ NEW: common behavior for monthly leave list view
|
|||
NEW: convert all subscription in datetime
|
||||
NEW: date shipment from order accepts hours
|
||||
NEW: price level compatibility for variant
|
||||
NEW: delayed payment in TakePOS
|
||||
NEW: display date range if exist in TakePOS
|
||||
NEW: display resiliate status in TakePOS for member
|
||||
NEW: display stat for BOM on "object referent"/linked Object product tab
|
||||
NEW: Email configuration - allow auto signed certificate when smtp ssl activated
|
||||
NEW: enable free emails input with select2
|
||||
|
|
@ -156,6 +171,9 @@ NEW: TakePOS add third order printer
|
|||
NEW: TakePOS can change thirdparty with barcode scan
|
||||
NEW: TakePOS can create a thirdparty customer from TakePOS frontend
|
||||
NEW: TakePOS connector compatibility with RECEIPT PRINTERS module
|
||||
NEW: TakePOS add delayed payment
|
||||
NEW: TakePOS display date range if exist
|
||||
NEW: TakePOS display resiliate status for members
|
||||
NEW: TakePOS Gift Receipt
|
||||
NEW: TakePOS multicurrency compatibility
|
||||
NEW: TakePOS multicurrency total
|
||||
|
|
@ -181,8 +199,7 @@ NEW: add option "If the feature to manage kits of module Stock is used, show det
|
|||
|
||||
For developers:
|
||||
---------------
|
||||
NEW: add substitution key __MEMBER_TYPE__
|
||||
NEW: add substitution key __TYPE__
|
||||
NEW: add __MEMBER_TYPE__ and __TYPE__ substitution key
|
||||
NEW: add function dolButtonToOpenUrlInDialogPopup() to be able to open page into a popup
|
||||
NEW: show line number on intervention card (via MAIN_VIEW_LINE_NUMBER)
|
||||
NEW: add some fields to link website page to an other object
|
||||
|
|
@ -194,12 +211,9 @@ NEW: can add event to log into blockedlog module with a constant
|
|||
NEW: add property cssview when declaring fields of an object
|
||||
NEW: can use dynamic code into the 'enabled' property of DAO fields
|
||||
NEW: field ref_ext in llx_commandedet
|
||||
NEW: field ref_ext for Attributes and Combinations
|
||||
NEW: fields ref_ext for Attributes and Combinations
|
||||
NEW: OAuth SCOPE for Admin SDK
|
||||
NEW: retrieve discount from invoice from API
|
||||
NEW: standardizes API thirdparties by email like other object
|
||||
NEW: Thirdparty REST API: endpoint to set price level
|
||||
NEW: use new category API for project list view
|
||||
NEW: Triggers Attributes and Attributes values
|
||||
NEW: add incoterms data into the substitution array
|
||||
NEW: add send context for ticket
|
||||
|
|
@ -216,11 +230,12 @@ NEW: API can update a payment
|
|||
NEW: API get member by thirdparty
|
||||
NEW: API get thirdparty by barcode
|
||||
NEW: API get users by email / login
|
||||
NEW: allow to edit field "demand reason" through API
|
||||
NEW: fetch contact by email with REST API
|
||||
NEW: get state by REST API
|
||||
NEW: get state dictionary by REST API
|
||||
NEW: improve Product API for product variants
|
||||
NEW: get state dictionnary by REST API
|
||||
NEW: improve Product API for variant products
|
||||
NEW: retrieve discount from invoice from API
|
||||
NEW: Thirdparty REST API: endpoint to set price level
|
||||
NEW: use new category API for project list view
|
||||
|
||||
HOOKs
|
||||
NEW: add hook on propal card
|
||||
|
|
@ -238,7 +253,7 @@ Following changes may create regressions for some external modules, but were nec
|
|||
* All properties ->titre have been renamed into ->title
|
||||
* Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id
|
||||
* Property 'num_paiement' has been renamed 'num_payment' everywhere for better code consistency.
|
||||
* The deprecated subsitution key __SIGNATURE__ has been removed. Use __USER_SIGNATURE__ if you used the old syntax in your email templates.
|
||||
* The deprecated subsitution key __SIGNATURE__ has been removed. Replace it with __USER_SIGNATURE__ if you used the old syntax in your email templates.
|
||||
* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom days of holiday.
|
||||
* If you build a class that implement CommonObject to use the incoterm properties or methods (->fk_incoterm, ->label_incoterm, ->location_incoterm),
|
||||
you must now also include declaration of the Trait 'CommonIncoterm' in your class. All incoterm functions were moved into this Trait.
|
||||
|
|
@ -251,6 +266,7 @@ Following changes may create regressions for some external modules, but were nec
|
|||
* Context for hook showSocinfoOnPrint has been moved from "showsocinfoonprint" to "main"
|
||||
* Library htdocs/includes/phpoffice/phpexcel as been removed (replaced with htdocs/includes/phpoffice/PhpSpreadsheet)
|
||||
* Databse transaction in your triggers must be correctly balanced (one close for one open). If not, an error will be returned by the trigger, even if trigger did return error code.
|
||||
* Dolibarr v13 is still compatible with any PHP version between 5.6.0 and 7.4.*; Unit tests are OK with PHP 8.0 but some warnings or troubles may appears with PHP 8.0.
|
||||
|
||||
|
||||
***** ChangeLog for 12.0.4 compared to 12.0.3 *****
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -444,9 +444,6 @@ if ($id)
|
|||
// Form to add a new line
|
||||
if ($tabname[$id])
|
||||
{
|
||||
$alabelisused = 0;
|
||||
$var = false;
|
||||
|
||||
$fieldlist = explode(',', $tabfield[$id]);
|
||||
|
||||
// Line for title
|
||||
|
|
@ -481,7 +478,6 @@ if ($id)
|
|||
}
|
||||
print '</td>';
|
||||
}
|
||||
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
|
||||
}
|
||||
|
||||
print '<td>';
|
||||
|
|
@ -612,7 +608,7 @@ if ($id)
|
|||
print ' <input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
|
||||
} else {
|
||||
$tmpaction = 'view';
|
||||
$parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
$error = $hookmanager->error; $errors = $hookmanager->errors;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
|||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||
$action = 'create';
|
||||
} else {
|
||||
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid='.((int) $conf->global->CHARTOFACCOUNTS);
|
||||
|
||||
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
|
||||
$result = $db->query($sql);
|
||||
|
|
|
|||
|
|
@ -438,8 +438,6 @@ if ($id)
|
|||
// Form to add a new line
|
||||
if ($tabname[$id])
|
||||
{
|
||||
$alabelisused = 0;
|
||||
|
||||
$fieldlist = explode(',', $tabfield[$id]);
|
||||
|
||||
// Line for title
|
||||
|
|
@ -496,7 +494,6 @@ if ($id)
|
|||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
|
||||
}
|
||||
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ if ($action == 'update') {
|
|||
if ($action == 'setlistsorttodo') {
|
||||
$setlistsorttodo = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -114,9 +114,10 @@ if ($action == 'setlistsorttodo') {
|
|||
if ($action == 'setlistsortdone') {
|
||||
$setlistsortdone = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -127,9 +128,10 @@ if ($action == 'setlistsortdone') {
|
|||
if ($action == 'setmanagezero') {
|
||||
$setmanagezero = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -140,9 +142,10 @@ if ($action == 'setmanagezero') {
|
|||
if ($action == 'setdisabledirectinput') {
|
||||
$setdisabledirectinput = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -153,9 +156,10 @@ if ($action == 'setdisabledirectinput') {
|
|||
if ($action == 'setenabledraftexport') {
|
||||
$setenabledraftexport = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -166,9 +170,10 @@ if ($action == 'setenabledraftexport') {
|
|||
if ($action == 'setenablesubsidiarylist') {
|
||||
$setenablesubsidiarylist = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -179,9 +184,10 @@ if ($action == 'setenablesubsidiarylist') {
|
|||
if ($action == 'setdisablebindingonsales') {
|
||||
$setdisablebindingonsales = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -192,9 +198,10 @@ if ($action == 'setdisablebindingonsales') {
|
|||
if ($action == 'setdisablebindingonpurchases') {
|
||||
$setdisablebindingonpurchases = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -205,9 +212,10 @@ if ($action == 'setdisablebindingonpurchases') {
|
|||
if ($action == 'setdisablebindingonexpensereports') {
|
||||
$setdisablebindingonexpensereports = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -215,9 +223,11 @@ if ($action == 'setdisablebindingonexpensereports') {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans('ConfigAccountingExpert');
|
||||
|
|
|
|||
|
|
@ -407,8 +407,6 @@ if ($id)
|
|||
// Form to add a new line
|
||||
if ($tabname[$id])
|
||||
{
|
||||
$alabelisused = 0;
|
||||
|
||||
$fieldlist = explode(',', $tabfield[$id]);
|
||||
|
||||
// Line for title
|
||||
|
|
@ -437,7 +435,6 @@ if ($id)
|
|||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
|
||||
}
|
||||
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -307,7 +306,7 @@ if ($action != 'export_csv')
|
|||
|
||||
$accountingaccountstatic->fetch(null, $line->numero_compte, true);
|
||||
if (!empty($accountingaccountstatic->account_number)) {
|
||||
$accounting_account = $accountingaccountstatic->getNomUrl(0, 1);
|
||||
$accounting_account = $accountingaccountstatic->getNomUrl(0, 1, 0, '', 0, -1, 0, 'accountcard');
|
||||
} else {
|
||||
$accounting_account = length_accountg($line->numero_compte);
|
||||
}
|
||||
|
|
@ -322,10 +321,19 @@ if ($action != 'export_csv')
|
|||
$root_account_description = $tmparrayforrootaccount['label'];
|
||||
$root_account_number = $tmparrayforrootaccount['account_number'];
|
||||
|
||||
//var_dump($tmparrayforrootaccount);
|
||||
//var_dump($accounting_account);
|
||||
//var_dump($accountingaccountstatic);
|
||||
if (empty($accountingaccountstatic->label) && $accountingaccountstatic->id > 0) {
|
||||
$link = '<a class="editfielda reposition" href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=update&token=' . newToken() . '&id=' . $accountingaccountstatic->id . '">' . img_edit() . '</a>';
|
||||
} elseif (empty($tmparrayforrootaccount['label'])) {
|
||||
} elseif ($accounting_account == 'NotDefined') {
|
||||
$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=create&token=' . newToken() . '&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
|
||||
} elseif (empty($tmparrayforrootaccount['label'])) {
|
||||
// $tmparrayforrootaccount['label'] not defined = the account has not parent with a parent.
|
||||
// This is useless, we should not create a new account when an account has no parent, we must edit it to fix its parent.
|
||||
// BUG 1: Accounts on level root or level 1 must not have a parent 2 level higher, so shoule not show a link to create another account.
|
||||
// BUG 2: Adding a link to create a new accounting account here is useless because it is not add as parent of the orphelin.
|
||||
//$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=create&token=' . newToken() . '&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
|
||||
}
|
||||
|
||||
if (!empty($show_subgroup))
|
||||
|
|
@ -363,8 +371,22 @@ if ($action != 'export_csv')
|
|||
print '<tr class="oddeven">';
|
||||
print '<td>'.$accounting_account.'</td>';
|
||||
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowraponall right">'.price($opening_balance).'</td>';
|
||||
print '<td class="nowraponall right">'.price($line->debit).'</td>';
|
||||
print '<td class="nowraponall right">'.price($line->credit).'</td>';
|
||||
|
||||
$urlzoom = '';
|
||||
if ($line->numero_compte) {
|
||||
$urlzoom = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($line->numero_compte).'&search_accountancy_code_end='.urlencode($line->numero_compte);
|
||||
if (GETPOSTISSET('date_startmonth')) {
|
||||
$urlzoom .= '&search_date_startmonth='.GETPOST('date_startmonth', 'int').'&search_date_startday='.GETPOST('date_startday', 'int').'&search_date_startyear='.GETPOST('date_startyear', 'int');
|
||||
}
|
||||
if (GETPOSTISSET('date_endmonth')) {
|
||||
$urlzoom .= '&search_date_endmonth='.GETPOST('date_endmonth', 'int').'&search_date_endday='.GETPOST('date_endday', 'int').'&search_date_endyear='.GETPOST('date_endyear', 'int');
|
||||
}
|
||||
}
|
||||
// Debit
|
||||
print '<td class="nowraponall right"><a href="'.$urlzoom.'">'.price($line->debit).'</a></td>';
|
||||
// Credit
|
||||
print '<td class="nowraponall right"><a href="'.$urlzoom.'">'.price($line->credit).'</a></td>';
|
||||
|
||||
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
|
||||
print '<td class="nowraponall right">'.price(price2num($opening_balance + $line->debit - $line->credit, 'MT')).'</td>';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -63,9 +63,11 @@ $accountingjournal->fetch(null, $journal_code);
|
|||
$journal_label = $accountingjournal->label;
|
||||
|
||||
$subledger_account = GETPOST('subledger_account', 'alphanohtml');
|
||||
if ($subledger_account == - 1) {
|
||||
if ($subledger_account == -1) {
|
||||
$subledger_account = null;
|
||||
}
|
||||
$subledger_label = GETPOST('subledger_label', 'alphanohtml');
|
||||
|
||||
$label_operation = GETPOST('label_operation', 'alphanohtml');
|
||||
$debit = price2num(GETPOST('debit', 'alpha'));
|
||||
$credit = price2num(GETPOST('credit', 'alpha'));
|
||||
|
|
@ -108,6 +110,7 @@ if ($action == "confirm_update") {
|
|||
} else {
|
||||
$object->numero_compte = $accountingaccount_number;
|
||||
$object->subledger_account = $subledger_account;
|
||||
$object->subledger_label = $subledger_label;
|
||||
$object->label_compte = $accountingaccount_label;
|
||||
$object->label_operation = $label_operation;
|
||||
$object->debit = $debit;
|
||||
|
|
@ -160,6 +163,7 @@ if ($action == "confirm_update") {
|
|||
|
||||
$object->numero_compte = $accountingaccount_number;
|
||||
$object->subledger_account = $subledger_account;
|
||||
$object->subledger_label = $subledger_label;
|
||||
$object->label_compte = $accountingaccount_label;
|
||||
$object->label_operation = $label_operation;
|
||||
$object->debit = $debit;
|
||||
|
|
@ -578,7 +582,7 @@ if ($action == 'create')
|
|||
|
||||
print '<br>';
|
||||
|
||||
$result = $object->fetchAllPerMvt($piece_num, $mode);
|
||||
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
|
|
@ -630,9 +634,10 @@ if ($action == 'create')
|
|||
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
|
||||
print $formaccounting->select_auxaccount((GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account), 'subledger_account', 1);
|
||||
} else {
|
||||
print '<input type="text" class="maxwidth150" name="subledger_account" value="'.(GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account).'">';
|
||||
print '<input type="text" class="maxwidth150" name="subledger_account" value="'.(GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account).'" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccount")).'">';
|
||||
}
|
||||
// TODO Add also the label
|
||||
// Add also input for subledger label
|
||||
print '<br><input type="text" class="maxwidth150" name="subledger_label" value="'.(GETPOSTISSET("subledger_label") ? GETPOST("subledger_label", "alpha") : $line->subledger_label).'" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccountLabel")).'">';
|
||||
print '</td>';
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value="'.(GETPOSTISSET("label_operation") ? GETPOST("label_operation", "alpha") : $line->label_operation).'"></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="debit" value="'.(GETPOSTISSET("debit") ? GETPOST("debit", "alpha") : price($line->debit)).'"></td>';
|
||||
|
|
@ -644,20 +649,24 @@ if ($action == 'create')
|
|||
} else {
|
||||
$accountingaccount->fetch(null, $line->numero_compte, true);
|
||||
print '<td>'.$accountingaccount->getNomUrl(0, 1, 1, '', 0).'</td>';
|
||||
print '<td>'.length_accounta($line->subledger_account).'</td>';
|
||||
print '<td>'.length_accounta($line->subledger_account);
|
||||
if ($line->subledger_label) {
|
||||
print ' - <span class="opacitymedium">'.$line->subledger_label.'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$line->label_operation.'</td>';
|
||||
print '<td class="nowrap right">'.price($line->debit).'</td>';
|
||||
print '<td class="nowrap right">'.price($line->credit).'</td>';
|
||||
|
||||
print '<td class="center">';
|
||||
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=update&id='.$line->id.'&piece_num='.$line->piece_num.'&mode='.$mode.'">';
|
||||
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=update&id='.$line->id.'&piece_num='.urlencode($line->piece_num).'&mode='.urlencode($mode).'&token='.urlencode(newToken()).'">';
|
||||
print img_edit('', 0, 'class="marginrightonly"');
|
||||
print '</a> ';
|
||||
|
||||
$actiontodelete = 'delete';
|
||||
if ($mode == '_tmp' || $action != 'delmouv') $actiontodelete = 'confirm_delete';
|
||||
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action='.$actiontodelete.'&id='.$line->id.'&piece_num='.$line->piece_num.'&mode='.$mode.'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action='.$actiontodelete.'&id='.$line->id.'&piece_num='.urlencode($line->piece_num).'&mode='.urlencode($mode).'&token='.urlencode(newToken()).'">';
|
||||
print img_delete();
|
||||
|
||||
print '</a>';
|
||||
|
|
@ -688,9 +697,9 @@ if ($action == 'create')
|
|||
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
|
||||
print $formaccounting->select_auxaccount('', 'subledger_account', 1);
|
||||
} else {
|
||||
print '<input type="text" class="maxwidth150" name="subledger_account" value="">';
|
||||
print '<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccount")).'">';
|
||||
}
|
||||
// TODO Add also the label
|
||||
print '<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccountLabel")).'">';
|
||||
print '</td>';
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value="'.$label_operation.'"/></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="debit" value=""/></td>';
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ $search_debit = GETPOST('search_debit', 'alpha');
|
|||
$search_credit = GETPOST('search_credit', 'alpha');
|
||||
$search_ledger_code = GETPOST('search_ledger_code', 'array');
|
||||
$search_lettering_code = GETPOST('search_lettering_code', 'alpha');
|
||||
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha');
|
||||
$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
|
|
@ -784,7 +784,7 @@ if (!empty($arrayfields['t.lettering_code']['checked']))
|
|||
{
|
||||
print '<td class="liste_titre center">';
|
||||
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
|
||||
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
|
||||
print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ $search_ledger_code = GETPOST('search_ledger_code', 'array');
|
|||
$search_debit = GETPOST('search_debit', 'alpha');
|
||||
$search_credit = GETPOST('search_credit', 'alpha');
|
||||
$search_lettering_code = GETPOST('search_lettering_code', 'alpha');
|
||||
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha');
|
||||
$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
|
||||
|
||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||
$action = 'delbookkeepingyear';
|
||||
|
|
@ -516,7 +516,7 @@ if (!empty($arrayfields['t.lettering_code']['checked']))
|
|||
{
|
||||
print '<td class="liste_titre center">';
|
||||
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
|
||||
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
|
||||
print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
|
||||
print '</td>';
|
||||
}
|
||||
// Date export
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ $search_ledger_code = GETPOST('search_ledger_code', 'array');
|
|||
$search_debit = GETPOST('search_debit', 'alpha');
|
||||
$search_credit = GETPOST('search_credit', 'alpha');
|
||||
$search_lettering_code = GETPOST('search_lettering_code', 'alpha');
|
||||
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha');
|
||||
$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
|
||||
|
||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||
$action = 'delbookkeepingyear';
|
||||
|
|
@ -544,7 +544,7 @@ if (!empty($arrayfields['t.credit']['checked'])) {
|
|||
if (!empty($arrayfields['t.lettering_code']['checked'])) {
|
||||
print '<td class="liste_titre center">';
|
||||
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
|
||||
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
|
||||
print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
|
||||
print '</td>';
|
||||
}
|
||||
// Date export
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ class AccountancyExport
|
|||
public static $EXPORT_TYPE_OPENCONCERTO = 100;
|
||||
public static $EXPORT_TYPE_LDCOMPTA = 110;
|
||||
public static $EXPORT_TYPE_LDCOMPTA10 = 120;
|
||||
public static $EXPORT_TYPE_GESTINUMV3 = 130;
|
||||
public static $EXPORT_TYPE_GESTINUMV5 = 135;
|
||||
public static $EXPORT_TYPE_GESTIMUMV3 = 130;
|
||||
public static $EXPORT_TYPE_GESTIMUMV5 = 135;
|
||||
public static $EXPORT_TYPE_FEC = 1000;
|
||||
public static $EXPORT_TYPE_FEC2 = 1010;
|
||||
|
||||
|
|
@ -119,8 +119,8 @@ class AccountancyExport
|
|||
self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans('Modelcsv_charlemagne'),
|
||||
self::$EXPORT_TYPE_LDCOMPTA => $langs->trans('Modelcsv_LDCompta'),
|
||||
self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans('Modelcsv_LDCompta10'),
|
||||
self::$EXPORT_TYPE_GESTINUMV3 => $langs->trans('Modelcsv_Gestinum_v3'),
|
||||
self::$EXPORT_TYPE_GESTINUMV5 => $langs->trans('Modelcsv_Gestinum_v5'),
|
||||
self::$EXPORT_TYPE_GESTIMUMV3 => $langs->trans('Modelcsv_Gestinum_v3'),
|
||||
self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans('Modelcsv_Gestinum_v5'),
|
||||
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
||||
self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'),
|
||||
);
|
||||
|
|
@ -154,8 +154,8 @@ class AccountancyExport
|
|||
self::$EXPORT_TYPE_CHARLEMAGNE => 'charlemagne',
|
||||
self::$EXPORT_TYPE_LDCOMPTA => 'ldcompta',
|
||||
self::$EXPORT_TYPE_LDCOMPTA10 => 'ldcompta10',
|
||||
self::$EXPORT_TYPE_GESTINUMV3 => 'gestinumv3',
|
||||
self::$EXPORT_TYPE_GESTINUMV5 => 'gestinumv5',
|
||||
self::$EXPORT_TYPE_GESTIMUMV3 => 'gestimumv3',
|
||||
self::$EXPORT_TYPE_GESTIMUMV5 => 'gestimumv5',
|
||||
self::$EXPORT_TYPE_FEC => 'fec',
|
||||
self::$EXPORT_TYPE_FEC2 => 'fec2',
|
||||
);
|
||||
|
|
@ -227,11 +227,13 @@ class AccountancyExport
|
|||
self::$EXPORT_TYPE_LDCOMPTA10 => array(
|
||||
'label' => $langs->trans('Modelcsv_LDCompta10'),
|
||||
),
|
||||
self::$EXPORT_TYPE_GESTINUMV3 => array(
|
||||
self::$EXPORT_TYPE_GESTIMUMV3 => array(
|
||||
'label' => $langs->trans('Modelcsv_Gestinumv3'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||
),
|
||||
self::$EXPORT_TYPE_GESTINUMV5 => array(
|
||||
self::$EXPORT_TYPE_GESTIMUMV5 => array(
|
||||
'label' => $langs->trans('Modelcsv_Gestinumv5'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||
),
|
||||
self::$EXPORT_TYPE_FEC => array(
|
||||
'label' => $langs->trans('Modelcsv_FEC'),
|
||||
|
|
@ -320,10 +322,10 @@ class AccountancyExport
|
|||
case self::$EXPORT_TYPE_LDCOMPTA10 :
|
||||
$this->exportLDCompta10($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_GESTINUMV3 :
|
||||
case self::$EXPORT_TYPE_GESTIMUMV3 :
|
||||
$this->exportGestimumV3($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_GESTINUMV5 :
|
||||
case self::$EXPORT_TYPE_GESTIMUMV5 :
|
||||
$this->exportGestimumV5($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_FEC :
|
||||
|
|
@ -1638,81 +1640,85 @@ class AccountancyExport
|
|||
$invoices_infos = array();
|
||||
$supplier_invoices_infos = array();
|
||||
foreach ($objectLines as $line) {
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
|
||||
$invoice_ref = $line->doc_ref;
|
||||
$company_name = "";
|
||||
|
||||
if (($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice') && $line->fk_doc > 0) {
|
||||
if (($line->doc_type == 'customer_invoice' && !isset($invoices_infos[$line->fk_doc])) ||
|
||||
($line->doc_type == 'supplier_invoice' && !isset($supplier_invoices_infos[$line->fk_doc]))) {
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
// Get new customer invoice ref and company name
|
||||
$sql = 'SELECT f.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture as f';
|
||||
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON f.fk_soc = s.rowid';
|
||||
$sql .= ' WHERE f.rowid = ' . $line->fk_doc;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
if ($obj = $this->db->fetch_object($resql)) {
|
||||
// Save invoice infos
|
||||
$invoices_infos[$line->fk_doc] = array('ref' => $obj->ref, 'company_name' => $obj->nom);
|
||||
$invoice_ref = $obj->ref;
|
||||
$company_name = $obj->nom;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Get new supplier invoice ref and company name
|
||||
$sql = 'SELECT ff.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture_fourn as ff';
|
||||
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON ff.fk_soc = s.rowid';
|
||||
$sql .= ' WHERE ff.rowid = ' . $line->fk_doc;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
if ($obj = $this->db->fetch_object($resql)) {
|
||||
// Save invoice infos
|
||||
$supplier_invoices_infos[$line->fk_doc] = array('ref' => $obj->ref, 'company_name' => $obj->nom);
|
||||
$invoice_ref = $obj->ref;
|
||||
$company_name = $obj->nom;
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($line->doc_type == 'customer_invoice') {
|
||||
// Retrieve invoice infos
|
||||
$invoice_ref = $invoices_infos[$line->fk_doc]['ref'];
|
||||
$company_name = $invoices_infos[$line->fk_doc]['company_name'];
|
||||
} else {
|
||||
// Retrieve invoice infos
|
||||
$invoice_ref = $supplier_invoices_infos[$line->fk_doc]['ref'];
|
||||
$company_name = $supplier_invoices_infos[$line->fk_doc]['company_name'];
|
||||
}
|
||||
}
|
||||
|
||||
print $line->id . $this->separator;
|
||||
print $date . $this->separator;
|
||||
print substr($line->code_journal, 0, 4) . $this->separator;
|
||||
|
||||
if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) {
|
||||
print length_accountg($line->subledger_account) . $this->separator;
|
||||
if ($line->debit == 0 && $line->credit == 0) {
|
||||
unset($array[$line]);
|
||||
} else {
|
||||
print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator;
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
|
||||
$invoice_ref = $line->doc_ref;
|
||||
$company_name = "";
|
||||
|
||||
if (($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice') && $line->fk_doc > 0) {
|
||||
if (($line->doc_type == 'customer_invoice' && !isset($invoices_infos[$line->fk_doc])) ||
|
||||
($line->doc_type == 'supplier_invoice' && !isset($supplier_invoices_infos[$line->fk_doc]))) {
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
// Get new customer invoice ref and company name
|
||||
$sql = 'SELECT f.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture as f';
|
||||
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON f.fk_soc = s.rowid';
|
||||
$sql .= ' WHERE f.rowid = ' . $line->fk_doc;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
if ($obj = $this->db->fetch_object($resql)) {
|
||||
// Save invoice infos
|
||||
$invoices_infos[$line->fk_doc] = array('ref' => $obj->ref, 'company_name' => $obj->nom);
|
||||
$invoice_ref = $obj->ref;
|
||||
$company_name = $obj->nom;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Get new supplier invoice ref and company name
|
||||
$sql = 'SELECT ff.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture_fourn as ff';
|
||||
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON ff.fk_soc = s.rowid';
|
||||
$sql .= ' WHERE ff.rowid = ' . $line->fk_doc;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
if ($obj = $this->db->fetch_object($resql)) {
|
||||
// Save invoice infos
|
||||
$supplier_invoices_infos[$line->fk_doc] = array('ref' => $obj->ref, 'company_name' => $obj->nom);
|
||||
$invoice_ref = $obj->ref;
|
||||
$company_name = $obj->nom;
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($line->doc_type == 'customer_invoice') {
|
||||
// Retrieve invoice infos
|
||||
$invoice_ref = $invoices_infos[$line->fk_doc]['ref'];
|
||||
$company_name = $invoices_infos[$line->fk_doc]['company_name'];
|
||||
} else {
|
||||
// Retrieve invoice infos
|
||||
$invoice_ref = $supplier_invoices_infos[$line->fk_doc]['ref'];
|
||||
$company_name = $supplier_invoices_infos[$line->fk_doc]['company_name'];
|
||||
}
|
||||
}
|
||||
|
||||
print $line->id . $this->separator;
|
||||
print $date . $this->separator;
|
||||
print substr($line->code_journal, 0, 4) . $this->separator;
|
||||
|
||||
if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) {
|
||||
print length_accountg($line->subledger_account) . $this->separator;
|
||||
} else {
|
||||
print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator;
|
||||
}
|
||||
//Libellé Auto
|
||||
print $this->separator;
|
||||
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
|
||||
//Libellé manuel
|
||||
print dol_trunc(str_replace('"', '', $invoice_ref . (!empty($company_name) ? ' - ' : '') . $company_name), 40, 'right', 'UTF-8', 1) . $this->separator;
|
||||
//Numéro de pièce
|
||||
print dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . $this->separator;
|
||||
//Devise
|
||||
print 'EUR' . $this->separator;
|
||||
//Montant
|
||||
print price2num(abs($line->montant)) . $this->separator;
|
||||
//Sens
|
||||
print $line->sens . $this->separator;
|
||||
//Code lettrage
|
||||
print $this->separator;
|
||||
//Date Echéance
|
||||
print $date;
|
||||
print $this->end_line;
|
||||
}
|
||||
//Libellé Auto
|
||||
print $this->separator;
|
||||
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
|
||||
//Libellé manuel
|
||||
print dol_trunc(str_replace('"', '', $invoice_ref . (!empty($company_name) ? ' - ' : '') . $company_name), 40, 'right', 'UTF-8', 1) . $this->separator;
|
||||
//Numéro de pièce
|
||||
print dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . $this->separator;
|
||||
//Devise
|
||||
print 'EUR' . $this->separator;
|
||||
//Montant
|
||||
print price2num(abs($line->montant)) . $this->separator;
|
||||
//Sens
|
||||
print $line->sens . $this->separator;
|
||||
//Code lettrage
|
||||
print $this->separator;
|
||||
//Date Echéance
|
||||
print $date;
|
||||
print $this->end_line;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1729,27 +1735,31 @@ class AccountancyExport
|
|||
$this->separator = ',';
|
||||
|
||||
foreach ($objectLines as $line) {
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
|
||||
print $line->id . $this->separator;
|
||||
print $date . $this->separator;
|
||||
print substr($line->code_journal, 0, 4) . $this->separator;
|
||||
if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) {
|
||||
print length_accountg($line->subledger_account) . $this->separator;
|
||||
if ($line->debit == 0 && $line->credit == 0) {
|
||||
unset($array[$line]);
|
||||
} else {
|
||||
print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator;
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
|
||||
print $line->id . $this->separator;
|
||||
print $date . $this->separator;
|
||||
print substr($line->code_journal, 0, 4) . $this->separator;
|
||||
if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) {
|
||||
print length_accountg($line->subledger_account) . $this->separator;
|
||||
} else {
|
||||
print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator;
|
||||
}
|
||||
print $this->separator;
|
||||
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
|
||||
print '"' . dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1) . '"' . $this->separator;
|
||||
print '"' . dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . '"' . $this->separator;
|
||||
print price2num($line->montant) . $this->separator;
|
||||
print $line->sens . $this->separator;
|
||||
print $date . $this->separator;
|
||||
print $this->separator;
|
||||
print $this->separator;
|
||||
print 'EUR';
|
||||
print $this->end_line;
|
||||
}
|
||||
print $this->separator;
|
||||
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
|
||||
print '"'.dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1).'"' . $this->separator;
|
||||
print '"'.dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1).'"'.$this->separator;
|
||||
print price2num($line->montant).$this->separator;
|
||||
print $line->sens.$this->separator;
|
||||
print $date . $this->separator;
|
||||
print $this->separator;
|
||||
print $this->separator;
|
||||
print 'EUR';
|
||||
print $this->end_line;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1914,25 +1914,24 @@ class BookKeeping extends CommonObject
|
|||
|
||||
/**
|
||||
* Return id and description of a root accounting account.
|
||||
* This function takes the parent of parent to get the root account !
|
||||
* FIXME: This function takes the parent of parent to get the root account !
|
||||
*
|
||||
* @param string $account Accounting account
|
||||
* @return string Root account
|
||||
* @return array Array with root account information (max 2 upper level)
|
||||
*/
|
||||
public function getRootAccount($account = null)
|
||||
{
|
||||
global $conf;
|
||||
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||
|
||||
$sql = "SELECT root.rowid, root.account_number, root.label as label";
|
||||
$sql = "SELECT root.rowid, root.account_number, root.label as label,";
|
||||
$sql .= " parent.rowid as parent_rowid, parent.account_number as parent_account_number, parent.label as parent_label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = ".((int) $pcgver);
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as parent ON aa.account_parent = parent.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as root ON parent.account_parent = root.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as parent ON aa.account_parent = parent.rowid AND parent.active = 1";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as root ON parent.account_parent = root.rowid AND root.active = 1";
|
||||
$sql .= " WHERE aa.account_number = '".$this->db->escape($account)."'";
|
||||
$sql .= " AND parent.active = 1";
|
||||
$sql .= " AND root.active = 1";
|
||||
$sql .= " AND aa.entity IN (".getEntity('accountancy').")";
|
||||
|
||||
dol_syslog(get_class($this)."::select_account sql=".$sql, LOG_DEBUG);
|
||||
|
|
@ -1943,7 +1942,8 @@ class BookKeeping extends CommonObject
|
|||
$obj = $this->db->fetch_object($resql);
|
||||
}
|
||||
|
||||
return array('id'=>$obj->rowid, 'account_number'=>$obj->account_number, 'label'=>$obj->label);
|
||||
$result = array('id'=>$obj->rowid, 'account_number'=>$obj->account_number, 'label'=>$obj->label);
|
||||
return $result;
|
||||
} else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(__METHOD__." ".$this->error, LOG_ERR);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ $userstatic = new User($db);
|
|||
$bankaccountstatic = new Account($db);
|
||||
$chargestatic = new ChargeSociales($db);
|
||||
$paymentdonstatic = new PaymentDonation($db);
|
||||
$paymentvatstatic = new TVA($db);
|
||||
$paymentvatstatic = new Tva($db);
|
||||
$paymentsalstatic = new PaymentSalary($db);
|
||||
$paymentexpensereportstatic = new PaymentExpenseReport($db);
|
||||
$paymentvariousstatic = new PaymentVarious($db);
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ if ($action == 'update' || $action == 'add') {
|
|||
$constnote = GETPOST('constnote');
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $choices[$consttype], 0, $constnote, $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ if ($action == 'update' || $action == 'add') {
|
|||
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ if ($action == 'update') {
|
|||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE", $forcetype, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ if ($action == "save" && empty($cancel))
|
|||
if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $keyparam))
|
||||
{
|
||||
$res = dolibarr_set_const($db, $keyparam, (GETPOST($keyparam, 'alpha') ?GETPOST($keyparam, 'alpha') : ''), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,15 +82,15 @@ if ($actionsave)
|
|||
|
||||
//print '-name='.$name.'-color='.$color;
|
||||
$res = dolibarr_set_const($db, 'AGENDA_EXT_NAME'.$i, $name, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, 'AGENDA_EXT_SRC'.$i, $src, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, 'AGENDA_EXT_OFFSETTZ'.$i, $offsettz, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, 'AGENDA_EXT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, 'AGENDA_EXT_ENABLED'.$i, $enabled, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ if ($actionsave)
|
|||
if (!$error)
|
||||
{
|
||||
$res = dolibarr_set_const($db, 'AGENDA_EXT_NB', trim(GETPOST('AGENDA_EXT_NB', 'int')), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5;
|
||||
$MAXAGENDA = empty($conf->global->AGENDA_EXT_NB) ? 5 : $conf->global->AGENDA_EXT_NB;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ $type = 'action';
|
|||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
$reg = array();
|
||||
if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
|
||||
{
|
||||
$code = $reg[1];
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ if ($actionsave)
|
|||
if ($color == '-1') $color = '';
|
||||
|
||||
$res = dolibarr_set_const($db, 'BANK_COLORIZE_MOVEMENT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ if ($action == 'updateMask')
|
|||
|
||||
if ($maskconstbom) $res = dolibarr_set_const($db, $maskconstbom, $maskbom, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -141,7 +141,7 @@ elseif ($action == 'setdoc')
|
|||
$draft = GETPOST("BOM_DRAFT_WATERMARK");
|
||||
$res = dolibarr_set_const($db, "BOM_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -155,7 +155,7 @@ elseif ($action == 'setdoc')
|
|||
|
||||
$res = dolibarr_set_const($db, "BOM_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ if ($action == 'updateMask')
|
|||
$maskchequereceipts = GETPOST('maskchequereceipts', 'alpha');
|
||||
if ($maskconstchequereceipts) $res = dolibarr_set_const($db, $maskconstchequereceipts, $maskchequereceipts, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -76,7 +76,7 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
|
|||
|
||||
$res = dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ if ($action == 'updateMask')
|
|||
|
||||
if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -146,7 +146,7 @@ elseif ($action == 'setdoc') {
|
|||
$draft = GETPOST("COMMANDE_DRAFT_WATERMARK");
|
||||
$res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -160,7 +160,7 @@ elseif ($action == 'setdoc') {
|
|||
|
||||
$res = dolibarr_set_const($db, "ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -172,7 +172,7 @@ elseif ($action == 'setdoc') {
|
|||
// Activate Set Shippable Icon In List
|
||||
$setshippableiconinlist = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -186,7 +186,7 @@ elseif ($action == 'setdoc') {
|
|||
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -201,7 +201,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
|
|||
{
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER", $value, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -216,7 +216,7 @@ elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')
|
|||
{
|
||||
$res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER", $value, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if ($action == 'updateMask')
|
|||
$maskvalue = GETPOST('maskcontract', 'alpha');
|
||||
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ if ($action == 'updateMask')
|
|||
$maskdelivery = GETPOST('maskdelivery', 'alpha');
|
||||
if ($maskconstdelivery) $res = dolibarr_set_const($db, $maskconstdelivery, $maskdelivery, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -73,7 +73,7 @@ if ($action == 'set_DELIVERY_FREE_TEXT')
|
|||
$free = GETPOST('DELIVERY_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "DELIVERY_FREE_TEXT", $free, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ $tabsqlsort[3] = "country ASC, code ASC";
|
|||
$tabsqlsort[4] = "code ASC";
|
||||
$tabsqlsort[5] = "label ASC";
|
||||
$tabsqlsort[6] = "a.type ASC, a.module ASC, a.position ASC, a.code ASC";
|
||||
$tabsqlsort[7] = "country ASC, code ASC, a.libelle ASC";
|
||||
$tabsqlsort[7] = "c.label ASC, a.code ASC, a.libelle ASC";
|
||||
$tabsqlsort[8] = "country DESC,".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ' t.position ASC,' : '')." libelle ASC";
|
||||
$tabsqlsort[9] = "label ASC";
|
||||
$tabsqlsort[10] = "country ASC, code ASC, taux ASC, recuperableonly ASC, localtax1 ASC, localtax2 ASC";
|
||||
|
|
@ -1069,6 +1069,7 @@ if ($id)
|
|||
elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code);
|
||||
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
|
||||
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
|
||||
elseif ($search_code != '' && $id == 7) $sql .= natural_search("a.code", $search_code);
|
||||
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
|
||||
|
||||
if ($sortfield)
|
||||
|
|
@ -1107,7 +1108,6 @@ if ($id)
|
|||
// Form to add a new line
|
||||
if ($tabname[$id])
|
||||
{
|
||||
$alabelisused = 0;
|
||||
$withentity = null;
|
||||
|
||||
$fieldlist = explode(',', $tabfield[$id]);
|
||||
|
|
@ -1214,7 +1214,6 @@ if ($id)
|
|||
else $tdsoffields .= $valuetoshow;
|
||||
$tdsoffields .= '</td>';
|
||||
}
|
||||
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
|
||||
}
|
||||
|
||||
if ($id == 4) $tdsoffields .= '<td></td>';
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ if ($action == 'updateMask') {
|
|||
$res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ if ($action == 'updateMask')
|
|||
if ($maskconstcredit) $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity);
|
||||
if ($maskconstdeposit) $res = dolibarr_set_const($db, $maskconstdeposit, $maskdeposit, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -156,7 +156,7 @@ elseif ($action == 'setdoc')
|
|||
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -170,7 +170,7 @@ elseif ($action == 'setdoc')
|
|||
|
||||
$res = dolibarr_set_const($db, "FACTURE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -184,7 +184,7 @@ elseif ($action == 'setdoc')
|
|||
|
||||
$res = dolibarr_set_const($db, "INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -198,7 +198,7 @@ elseif ($action == 'setdoc')
|
|||
|
||||
$res = dolibarr_set_const($db, "FAC_FORCE_DATE_VALIDATION", $forcedate, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -217,7 +217,7 @@ elseif ($action == 'setdoc')
|
|||
foreach ($invoicetypemodels as $type => $value)
|
||||
{
|
||||
$res = dolibarr_set_const($db, 'FACTURE_ADDON_PDF_'.intval($type), $value, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ if ($action == 'updateMask')
|
|||
$maskvalue = GETPOST('maskvalue', 'alpha');
|
||||
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ elseif ($action == 'setdoc')
|
|||
$freetext = GETPOST('FICHINTER_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -160,7 +160,7 @@ elseif ($action == 'setdoc')
|
|||
$draft = GETPOST('FICHINTER_DRAFT_WATERMARK', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -173,7 +173,7 @@ elseif ($action == 'setdoc')
|
|||
$val = GETPOST('FICHINTER_PRINT_PRODUCTS', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_PRINT_PRODUCTS", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -185,7 +185,7 @@ elseif ($action == 'setdoc')
|
|||
$val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ elseif ($action == 'setdoc')
|
|||
$val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ elseif ($action == 'setdoc')
|
|||
$val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ if ($action == 'updateMask')
|
|||
$maskvalue = GETPOST('maskholiday', 'alpha');
|
||||
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ $action = GETPOST('action', 'aZ09');
|
|||
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
|
@ -52,21 +53,20 @@ if ($action == 'setvalue')
|
|||
$contactbulkdefault = GETPOST('MAILING_CONTACT_DEFAULT_BULK_STATUS', 'int');
|
||||
|
||||
$res = dolibarr_set_const($db, "MAILING_EMAIL_FROM", $mailfrom, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO", $mailerror, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, "MAILING_DELAY", $mailingdelay, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, "MAILING_CONTACT_DEFAULT_BULK_STATUS", $contactbulkdefault, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
// Create temporary encryption key if nedded
|
||||
$res = dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY", $checkread_key, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -77,7 +77,7 @@ if ($action == 'setvalue')
|
|||
if ($action == 'setonsearchandlistgooncustomerorsuppliercard') {
|
||||
$setonsearchandlistgooncustomerorsuppliercard = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard, 'yesno', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
if (!$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ if ($action == 'update' || $action == 'add')
|
|||
$constnote = $_POST["constnote"][$key];
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
|
|
|
|||
|
|
@ -532,6 +532,7 @@ if ($action == 'edit')
|
|||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
|
|
@ -552,10 +553,12 @@ if ($action == 'edit')
|
|||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) {
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td></td></tr>';
|
||||
|
||||
|
|
@ -663,6 +666,7 @@ if ($action == 'edit')
|
|||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) {
|
||||
print info_admin($langs->trans("WarningPHPMail").'<br>'.$langs->trans("WarningPHPMailA").'<br>'.$langs->trans("WarningPHPMailB").'<br>'.$langs->trans("WarningPHPMailC").'<br><br>'.$langs->trans("WarningPHPMailD"), 0, 0, 'warning');
|
||||
|
|
@ -670,11 +674,12 @@ if ($action == 'edit')
|
|||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("OtherOptions").'</td><td></td></tr>';
|
||||
|
||||
// From
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ?ini_get('sendmail_from') : $langs->transnoentities("Undefined")).'</td>';
|
||||
print '<tr class="oddeven"><td class="fieldrequired">'.$langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ?ini_get('sendmail_from') : $langs->transnoentities("Undefined")).'</td>';
|
||||
print '<td>'.$conf->global->MAIN_MAIL_EMAIL_FROM;
|
||||
if (!empty($conf->global->MAIN_MAIL_EMAIL_FROM) && !isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail"));
|
||||
print '</td></tr>';
|
||||
|
|
@ -746,6 +751,7 @@ if ($action == 'edit')
|
|||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").'</td><td>'.yn($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ if ($action == 'updateMask')
|
|||
|
||||
if ($maskconstmrp) $res = dolibarr_set_const($db, $maskconstmrp, $maskmrp, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -142,7 +142,7 @@ elseif ($action == 'setdoc')
|
|||
$draft = GETPOST("MRP_MO_DRAFT_WATERMARK");
|
||||
$res = dolibarr_set_const($db, "MRP_MO_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -156,7 +156,7 @@ elseif ($action == 'setdoc')
|
|||
|
||||
$res = dolibarr_set_const($db, "MRP_MO_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ if ($action == 'updateMask')
|
|||
$maskpayment = GETPOST('maskpayment', 'alpha');
|
||||
if ($maskconstpayment) $res = dolibarr_set_const($db, $maskconstpayment, $maskpayment, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -70,10 +70,10 @@ if ($action == 'setparams')
|
|||
{
|
||||
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS', 'restricthtml'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
$res = dolibarr_set_const($db, "PAYMENTS_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if ($error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,10 +50,9 @@ if ($action == "set")
|
|||
|
||||
$id = GETPOST('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 'int');
|
||||
$account = new Account($db);
|
||||
if ($account->fetch($id) > 0)
|
||||
{
|
||||
if ($account->fetch($id) > 0) {
|
||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
/*
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
|
|
@ -70,32 +69,35 @@ if ($action == "set")
|
|||
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
*/
|
||||
} else $error++;
|
||||
} else {
|
||||
$error++;
|
||||
}
|
||||
/* Moved to account
|
||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
*/
|
||||
|
||||
if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0)
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
/*
|
||||
if (GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END") || GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END") == "")
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_END_TO_END", GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
if (GETPOST("PAYMENTBYBANKTRANSFER_USTRD") || GETPOST("PAYMENTBYBANKTRANSFER_USTRD") == "")
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USTRD", GETPOST("PAYMENTBYBANKTRANSFER_USTRD"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
*/
|
||||
if (GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS") || GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS") == "")
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ADDDAYS", GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
} elseif (!$error)
|
||||
{
|
||||
$db->commit();
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ if ($action == "set")
|
|||
if ($account->fetch($id) > 0)
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
/*
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
|
|
@ -75,21 +75,20 @@ if ($action == "set")
|
|||
} else $error++;
|
||||
|
||||
/* Moved to account
|
||||
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
*/
|
||||
if (GETPOST("PRELEVEMENT_USER") > 0) {
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
if (GETPOST("PRELEVEMENT_END_TO_END") || GETPOST("PRELEVEMENT_END_TO_END") == "") {
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_END_TO_END", GETPOST("PRELEVEMENT_END_TO_END"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
if (GETPOST("PRELEVEMENT_USTRD") || GETPOST("PRELEVEMENT_USTRD") == "") {
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_USTRD", GETPOST("PRELEVEMENT_USTRD"), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if ($action == 'updateMask') {
|
|||
$maskpropal = GETPOST('maskpropal', 'alpha');
|
||||
if ($maskconstpropal) $res = dolibarr_set_const($db, $maskconstpropal, $maskpropal, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -109,7 +109,7 @@ if ($action == 'updateMask') {
|
|||
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -121,7 +121,7 @@ if ($action == 'updateMask') {
|
|||
$draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -134,7 +134,7 @@ if ($action == 'updateMask') {
|
|||
|
||||
$res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -145,7 +145,7 @@ if ($action == 'updateMask') {
|
|||
} elseif ($action == 'setdefaultduration') {
|
||||
$res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -156,7 +156,7 @@ if ($action == 'updateMask') {
|
|||
} elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') {
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ if ($action == 'update' || $action == 'add')
|
|||
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ if ($action == 'warehouse')
|
|||
if ($value == -1 || empty($value) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) {
|
||||
$res = dolibarr_del_const($db, "MAIN_DEFAULT_WAREHOUSE", $conf->entity);
|
||||
}
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
|
||||
if ($action == 'specimen')
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ if ($action == 'updateMask')
|
|||
if ($maskconstinvoice) $res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity);
|
||||
if ($maskconstcredit) $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -170,7 +170,7 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT')
|
|||
|
||||
$res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ if ($action == 'updateMask')
|
|||
|
||||
if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -194,7 +194,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER')
|
|||
{
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER", $value, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ if ($action == 'updateMask')
|
|||
$masksupplierpayment = GETPOST('masksupplierpayment', 'alpha');
|
||||
if ($maskconstsupplierpayment) $res = dolibarr_set_const($db, $maskconstsupplierpayment, $masksupplierpayment, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -136,7 +136,7 @@ elseif ($action == 'setdoc')
|
|||
} elseif ($action == 'setparams')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if ($error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ if ($action == 'updateMask')
|
|||
$masksupplier_proposal = GETPOST('masksupplier_proposal', 'alpha');
|
||||
if ($maskconstsupplier_proposal) $res = dolibarr_set_const($db, $maskconstsupplier_proposal, $masksupplier_proposal, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -111,7 +111,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK')
|
|||
$draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK', 'alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -127,7 +127,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT')
|
|||
|
||||
$res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -141,7 +141,7 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL')
|
|||
{
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ if ($action == 'setlevel')
|
|||
$res = dolibarr_set_const($db, "SYSLOG_LEVEL", $level, 'chaine', 0, '', 0);
|
||||
dol_syslog("admin/syslog: level ".$level);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -146,7 +146,7 @@ if ($action == 'setlevel')
|
|||
$res = dolibarr_set_const($db, "SYSLOG_FILE_SAVES", $file_saves, 'chaine', 0, '', 0);
|
||||
dol_syslog("admin/syslog: file saves ".$file_saves);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ if ($action == 'update') {
|
|||
$db->begin();
|
||||
|
||||
$res = dolibarr_set_const($db, 'TAX_MODE', $tax_mode, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
switch ($tax_mode)
|
||||
{
|
||||
|
|
@ -90,13 +90,13 @@ if ($action == 'update') {
|
|||
}
|
||||
|
||||
$res = dolibarr_set_const($db, 'TAX_MODE_SELL_PRODUCT', $valuesellproduct, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, 'TAX_MODE_BUY_PRODUCT', $valuebuyproduct, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, 'TAX_MODE_SELL_SERVICE', $valuesellservice, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
$res = dolibarr_set_const($db, 'TAX_MODE_BUY_SERVICE', $valuebuyservice, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ if ($action == 'updateMask') {
|
|||
$res = dolibarr_set_const($db, $maskconstticket, $maskticket, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ elseif ($action == 'setmod') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ elseif ($action == 'setmod') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ elseif ($action == 'setmod') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ elseif ($action == 'setmod') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
|
@ -152,13 +152,13 @@ elseif ($action == 'setmod') {
|
|||
if ($action == 'setvarother') {
|
||||
$param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$param_disable_email = GETPOST('TICKET_DISABLE_NOTIFICATION_MAILS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_DISABLE_NOTIFICATION_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ if ($action == 'setvarother') {
|
|||
{
|
||||
$param_show_module_logo = GETPOST('TICKET_SHOW_MODULE_LOGO', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
|
@ -175,20 +175,20 @@ if ($action == 'setvarother') {
|
|||
{
|
||||
$param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
$param_limit_view = GETPOST('TICKET_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ if ($action == 'setvar') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ if ($action == 'setvar') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ if ($action == 'setvar') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ if ($action == 'setvar') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -103,13 +103,13 @@ if ($action == 'setvar') {
|
|||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$param_public_notification_new_message_default_email = GETPOST('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL', $param_public_notification_new_message_default_email, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
|
@ -117,25 +117,25 @@ if ($action == 'setvar') {
|
|||
if ($action == 'setvarother') {
|
||||
$param_enable_public_interface = GETPOST('TICKET_ENABLE_PUBLIC_INTERFACE', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_ENABLE_PUBLIC_INTERFACE', $param_enable_public_interface, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$param_disable_email = GETPOST('TICKET_DISABLE_CUSTOMER_MAILS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_DISABLE_CUSTOMER_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$param_show_module_logo = GETPOST('TICKET_SHOW_COMPANY_LOGO', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_SHOW_COMPANY_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ if ($action == 'setvarother') {
|
|||
{
|
||||
$param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -435,9 +435,6 @@ if ($id)
|
|||
// Form to add a new line
|
||||
if ($tabname[$id])
|
||||
{
|
||||
$alabelisused = 0;
|
||||
$var = false;
|
||||
|
||||
$fieldlist = explode(',', $tabfield[$id]);
|
||||
|
||||
// Line for title
|
||||
|
|
@ -461,7 +458,6 @@ if ($id)
|
|||
} else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
|
||||
}
|
||||
|
||||
print '<td colspan="4">';
|
||||
|
|
@ -469,7 +465,7 @@ if ($id)
|
|||
print '</tr>';
|
||||
|
||||
// Line to enter new values
|
||||
print "<tr ".$bcnd[$var].">";
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
|
|
@ -570,7 +566,7 @@ if ($id)
|
|||
print ' <input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
|
||||
} else {
|
||||
$tmpaction = 'view';
|
||||
$parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$reshook = $hookmanager->executeHooks('viewWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
$error = $hookmanager->error; $errors = $hookmanager->errors;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ if ($action == 'updateMask')
|
|||
|
||||
if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ if ($action == 'setvalue') {
|
|||
$showmenu = GETPOST('BOOKMARKS_SHOW_IN_MENU', 'alpha');
|
||||
$res = dolibarr_set_const($db, "BOOKMARKS_SHOW_IN_MENU", $showmenu, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ if (GETPOST('action', 'alpha') == 'set')
|
|||
|
||||
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ if ($action == 'delete')
|
|||
if ($res > 0)
|
||||
{
|
||||
$res = $objectpage->delete($user);
|
||||
if (!$res > 0)
|
||||
if (!($res > 0))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($objectpage->error, $objectpage->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -97,6 +97,14 @@ if ($object->id > 0) {
|
|||
|
||||
$now = dol_now();
|
||||
|
||||
if ($id > 0 && empty($object->id))
|
||||
{
|
||||
// Load data of third party
|
||||
$res = $object->fetch($id);
|
||||
if ($object->id < 0) dol_print_error($db, $object->error, $object->errors);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -226,6 +234,12 @@ if (empty($reshook))
|
|||
}
|
||||
if ($error) $action = 'edit_extras';
|
||||
}
|
||||
|
||||
// warehouse
|
||||
if ($action == 'setwarehouse' && $user->rights->societe->creer)
|
||||
{
|
||||
$result = $object->setWarehouse(GETPOST('fk_warehouse', 'int'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -238,13 +252,6 @@ $userstatic = new User($db);
|
|||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
if ($id > 0 && empty($object->id))
|
||||
{
|
||||
// Load data of third party
|
||||
$res = $object->fetch($id);
|
||||
if ($object->id < 0) dol_print_error($db, $object->error, $object->errors);
|
||||
}
|
||||
|
||||
$title = $langs->trans("CustomerCard");
|
||||
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name;
|
||||
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
|
|
@ -480,7 +487,24 @@ if ($object->id > 0)
|
|||
print "</td>";
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Warehouse
|
||||
if (!empty($conf->stock->enabled))
|
||||
{
|
||||
$langs->load('stocks');
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
$formproduct = new FormProduct($db);
|
||||
print '<tr class="nowrap">';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $user->rights->societe->creer);
|
||||
print '</td><td>';
|
||||
if ($action == 'editwarehouse') {
|
||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_warehouse, 'fk_warehouse', 1);
|
||||
} else {
|
||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_warehouse, 'none');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
// Preferred shipping Method
|
||||
if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD)) {
|
||||
print '<tr><td class="nowrap">';
|
||||
|
|
@ -507,11 +531,12 @@ if ($object->id > 0)
|
|||
print '<table class="centpercent nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('IntracommReportTransportMode');
|
||||
print '<td>';
|
||||
if (($action != 'edittransportmode') && $user->rights->societe->creer) print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edittransportmode&socid='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>';
|
||||
if (($action != 'edittransportmode') && $user->rights->societe->creer) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edittransportmode&socid='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'edittransportmode')
|
||||
{
|
||||
if ($action == 'edittransportmode') {
|
||||
$form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_transport_mode, 'fk_transport_mode', 1);
|
||||
}
|
||||
else {
|
||||
|
|
@ -538,8 +563,7 @@ if ($object->id > 0)
|
|||
include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
|
||||
|
||||
// Module Adherent
|
||||
if (!empty($conf->adherent->enabled))
|
||||
{
|
||||
if (!empty($conf->adherent->enabled)) {
|
||||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
|
||||
|
|
@ -547,10 +571,9 @@ if ($object->id > 0)
|
|||
print '<td>';
|
||||
$adh = new Adherent($db);
|
||||
$result = $adh->fetch('', '', $object->id);
|
||||
if ($result > 0)
|
||||
{
|
||||
if ($result > 0) {
|
||||
$adh->ref = $adh->getFullName($langs);
|
||||
print $adh->getNomUrl(1);
|
||||
print $adh->getNomUrl(-1);
|
||||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("ThirdpartyNotLinkedToMember").'</span>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,9 +129,6 @@ $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc
|
|||
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php
|
||||
|
||||
|
||||
//if ($thirdparty->fk_warehouse > 0) $object->warehouse_id = $thirdparty->fk_warehouse;
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
|
@ -1495,6 +1492,7 @@ if ($action == 'create')
|
|||
}
|
||||
|
||||
//Warehouse default if null
|
||||
if ($soc->fk_warehouse > 0) $warehouse_id = $soc->fk_warehouse;
|
||||
if (!empty($conf->stock->enabled) && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER))
|
||||
{
|
||||
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
|
||||
|
|
|
|||
|
|
@ -1259,15 +1259,13 @@ if ($resql)
|
|||
$listsalesrepresentatives = $companystatic->getSalesRepresentatives($user);
|
||||
if ($listsalesrepresentatives < 0) dol_print_error($db);
|
||||
$nbofsalesrepresentative = count($listsalesrepresentatives);
|
||||
if ($nbofsalesrepresentative > 3) // We print only number
|
||||
{
|
||||
if ($nbofsalesrepresentative > 6) {
|
||||
// We print only number
|
||||
print $nbofsalesrepresentative;
|
||||
} elseif ($nbofsalesrepresentative > 0)
|
||||
{
|
||||
} elseif ($nbofsalesrepresentative > 0) {
|
||||
$userstatic = new User($db);
|
||||
$j = 0;
|
||||
foreach ($listsalesrepresentatives as $val)
|
||||
{
|
||||
foreach ($listsalesrepresentatives as $val) {
|
||||
$userstatic->id = $val['id'];
|
||||
$userstatic->lastname = $val['lastname'];
|
||||
$userstatic->firstname = $val['firstname'];
|
||||
|
|
@ -1275,11 +1273,16 @@ if ($resql)
|
|||
$userstatic->statut = $val['statut'];
|
||||
$userstatic->entity = $val['entity'];
|
||||
$userstatic->photo = $val['photo'];
|
||||
|
||||
$userstatic->login = $val['login'];
|
||||
$userstatic->phone = $val['phone'];
|
||||
$userstatic->job = $val['job'];
|
||||
$userstatic->gender = $val['gender'];
|
||||
//print '<div class="float">':
|
||||
print $userstatic->getNomUrl(-2);
|
||||
print ($nbofsalesrepresentative < 3) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
$j++;
|
||||
if ($j < $nbofsalesrepresentative) print ' ';
|
||||
if ($j < $nbofsalesrepresentative) {
|
||||
print ' ';
|
||||
}
|
||||
//print '</div>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes')
|
|||
$remid = (GETPOST("remid", 'int') ? GETPOST("remid", 'int') : 0);
|
||||
$discount = new DiscountAbsolute($db);
|
||||
$res = $discount->fetch($remid);
|
||||
if (!$res > 0)
|
||||
if (!($res > 0))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFailedToLoadDiscount"), null, 'errors');
|
||||
|
|
|
|||
|
|
@ -1534,6 +1534,7 @@ if ($action == 'create' && $usercancreate)
|
|||
}
|
||||
|
||||
//Warehouse default if null
|
||||
if ($soc->fk_warehouse > 0) $warehouse_id = $soc->fk_warehouse;
|
||||
if (!empty($conf->stock->enabled) && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER))
|
||||
{
|
||||
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
|
||||
|
|
|
|||
|
|
@ -286,8 +286,9 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier)
|
|||
$cat1 = GETPOST("cat1", 'alpha');
|
||||
|
||||
$bankaccountid = $id;
|
||||
if (GETPOST('add_account', 'int') > 0) $bankaccountid = GETPOST('add_account', 'int');
|
||||
|
||||
if (GETPOST('add_account', 'int') > 0) {
|
||||
$bankaccountid = GETPOST('add_account', 'int');
|
||||
}
|
||||
if (!$dateop) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
|
|
@ -304,8 +305,7 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier)
|
|||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors');
|
||||
}
|
||||
if (!$bankaccountid > 0)
|
||||
{
|
||||
if (!$bankaccountid > 0) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors');
|
||||
}
|
||||
|
|
@ -315,8 +315,7 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier)
|
|||
$error++;
|
||||
}*/
|
||||
|
||||
if (!$error && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT))
|
||||
{
|
||||
if (!$error && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) {
|
||||
$objecttmp = new Account($db);
|
||||
$objecttmp->fetch($bankaccountid);
|
||||
$insertid = $objecttmp->addline($dateop, $operation, $label, $amount, $num_chq, ($cat1 > 0 ? $cat1 : 0), $user, '', '', $search_accountancy_code);
|
||||
|
|
@ -368,7 +367,7 @@ $donstatic = new Don($db);
|
|||
$paymentstatic = new Paiement($db);
|
||||
$paymentsupplierstatic = new PaiementFourn($db);
|
||||
$paymentscstatic = new PaymentSocialContribution($db);
|
||||
$paymentvatstatic = new TVA($db);
|
||||
$paymentvatstatic = new Tva($db);
|
||||
$paymentsalstatic = new PaymentSalary($db);
|
||||
$paymentdonationstatic = new PaymentDonation($db);
|
||||
$paymentvariousstatic = new PaymentVarious($db);
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ $chargestatic = new ChargeSociales($db);
|
|||
$memberstatic = new Adherent($db);
|
||||
$paymentstatic = new Paiement($db);
|
||||
$paymentsupplierstatic = new PaiementFourn($db);
|
||||
$paymentvatstatic = new TVA($db);
|
||||
$paymentvatstatic = new Tva($db);
|
||||
$bankstatic = new Account($db);
|
||||
$banklinestatic = new AccountLine($db);
|
||||
$remisestatic = new RemiseCheque($db);
|
||||
|
|
|
|||
|
|
@ -265,10 +265,8 @@ print '</td></tr>';
|
|||
// Bank account
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
if ($object->fk_account > 0)
|
||||
{
|
||||
if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0)
|
||||
{
|
||||
if ($object->fk_account > 0) {
|
||||
if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0) {
|
||||
dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php');
|
||||
$bordereau = new RemiseCheque($db);
|
||||
$bordereau->fetch($bankline->fk_bordereau);
|
||||
|
|
@ -285,7 +283,12 @@ if (!empty($conf->banque->enabled))
|
|||
print '<tr>';
|
||||
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
||||
print '<td>';
|
||||
print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
|
||||
if ($object->fk_account > 0) {
|
||||
print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
|
||||
} else {
|
||||
$langs->load("admin");
|
||||
print '<span class="opacitymedium">'.$langs->trans("NoRecordFoundIBankcAccount", $langs->transnoentitiesnoconv("Module85Name")).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ if ($action == 'create')
|
|||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
$datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int'));
|
||||
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (GETPOSTISSET("remonth") ? $datepaye : -1) : 0;
|
||||
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (GETPOSTISSET("remonth") ? $datepaye : -1) : '';
|
||||
print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1, 0, '', '', $charge->date_ech, '', 1, $langs->trans("DateOfSocialContribution"));
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
|
@ -236,7 +236,7 @@ if ($action == 'create')
|
|||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
|
||||
print '<td>';
|
||||
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : $charge->accountid, "accountid", 0, '', 2); // Show opend bank account list
|
||||
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", 'int') : $charge->accountid, "accountid", 0, '', 2); // Show opend bank account list
|
||||
print '</td></tr>';
|
||||
|
||||
// Number
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ $mesg = ''; $error = 0; $errors = array();
|
|||
$action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
|
||||
|
|
@ -311,9 +313,9 @@ if (empty($reshook))
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer)
|
||||
if ($action == 'update' && empty($cancel) && $user->rights->societe->contact->creer)
|
||||
{
|
||||
if (empty(GETPOST("lastname", 'alpha')))
|
||||
if (!GETPOST("lastname", 'alpha'))
|
||||
{
|
||||
$error++; $errors = array($langs->trans("ErrorFieldRequired", $langs->transnoentities("Name").' / '.$langs->transnoentities("Label")));
|
||||
$action = 'edit';
|
||||
|
|
@ -337,6 +339,7 @@ if (empty($reshook))
|
|||
{
|
||||
$contactid = GETPOST("contactid", 'int');
|
||||
$object->fetch($contactid);
|
||||
$object->fetchRoles($contactid);
|
||||
|
||||
// Photo save
|
||||
$dir = $conf->societe->multidir_output[$object->entity]."/contact/".$object->id."/photos";
|
||||
|
|
@ -425,7 +428,8 @@ if (empty($reshook))
|
|||
$object->priv = (string) GETPOST("priv", 'int');
|
||||
$object->note_public = (string) GETPOST("note_public", 'restricthtml');
|
||||
$object->note_private = (string) GETPOST("note_private", 'restricthtml');
|
||||
$object->roles = GETPOST("roles", 'array');
|
||||
|
||||
$object->roles = GETPOST("roles", 'array'); // Note GETPOSTISSET("role") is null when combo is empty
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ class Contact extends CommonObject
|
|||
/**
|
||||
* @var array roles
|
||||
*/
|
||||
public $roles = array();
|
||||
public $roles;
|
||||
|
||||
public $cacheprospectstatus = array();
|
||||
public $fk_prospectlevel;
|
||||
|
|
@ -888,7 +888,7 @@ class Contact extends CommonObject
|
|||
* @param User $user Load also alerts of this user (subscribing to alerts) that want alerts about this contact
|
||||
* @param string $ref_ext External reference, not given by Dolibarr
|
||||
* @param string $email Email
|
||||
* @param int $loadalsoroles Load also roles
|
||||
* @param int $loadalsoroles Load also roles. Try to always 0 here and load roles with a separate call of fetchRoles().
|
||||
* @return int >0 if OK, <0 if KO or if two records found for same ref or idprof, 0 if not found.
|
||||
*/
|
||||
public function fetch($id, $user = null, $ref_ext = '', $email = '', $loadalsoroles = 0)
|
||||
|
|
@ -1647,10 +1647,11 @@ class Contact extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Fetch Roles for a contact
|
||||
* Fetch roles (default contact of some companies) for the current contact.
|
||||
* This load the array ->roles.
|
||||
*
|
||||
* @return float|int
|
||||
* @throws Exception
|
||||
* @return int <0 if KO, Nb of roles found if OK
|
||||
* @see updateRoles()
|
||||
*/
|
||||
public function fetchRoles()
|
||||
{
|
||||
|
|
@ -1658,25 +1659,23 @@ class Contact extends CommonObject
|
|||
$error = 0;
|
||||
$num = 0;
|
||||
|
||||
$sql = "SELECT tc.rowid, tc.element, tc.source, tc.code, tc.libelle, sc.rowid as contactroleid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe_contacts as sc";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc";
|
||||
$sql .= " ON tc.rowid = sc.fk_c_type_contact";
|
||||
$sql .= " AND sc.fk_socpeople = ".$this->id;
|
||||
$sql = "SELECT tc.rowid, tc.element, tc.source, tc.code, tc.libelle as label, sc.rowid as contactroleid, sc.fk_soc as socid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe_contacts as sc, ".MAIN_DB_PREFIX."c_type_contact as tc";
|
||||
$sql .= " WHERE tc.rowid = sc.fk_c_type_contact";
|
||||
$sql .= " AND tc.source = 'external' AND tc.active=1";
|
||||
$sql .= " AND sc.fk_socpeople = ".$this->id;
|
||||
$sql .= " AND sc.entity IN (".getEntity('societe').')';
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$this->roles = array();
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$this->roles = array();
|
||||
|
||||
$num = $this->db->num_rows($resql);
|
||||
if ($num > 0) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$transkey = "TypeContact_".$obj->element."_".$obj->source."_".$obj->code;
|
||||
$libelle_element = $langs->trans('ContactDefault_'.$obj->element);
|
||||
$this->roles[$obj->contactroleid] = array('id'=>$obj->rowid, 'element'=>$obj->element, 'source'=>$obj->source, 'code'=>$obj->code, 'label'=>$libelle_element.' - '.($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle));
|
||||
$this->roles[$obj->contactroleid] = array('id'=>$obj->rowid, 'socid'=>$obj->socid, 'element'=>$obj->element, 'source'=>$obj->source, 'code'=>$obj->code, 'label'=>$libelle_element.' - '.($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->label));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1738,10 +1737,11 @@ class Contact extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates Roles
|
||||
* Updates all roles (default contact for companies) according to values inside the ->roles array.
|
||||
* This is called by update of contact.
|
||||
*
|
||||
* @return float|int
|
||||
* @throws Exception
|
||||
* @see fetchRoles()
|
||||
*/
|
||||
public function updateRoles()
|
||||
{
|
||||
|
|
@ -1749,11 +1749,12 @@ class Contact extends CommonObject
|
|||
|
||||
$error = 0;
|
||||
|
||||
if (!isset($this->roles)) return; // Avoid to loose roles when property not set
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_soc=".$this->socid." AND fk_socpeople=".$this->id; ;
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_socpeople=".$this->id." AND entity IN (".getEntity("societe_contact").")";
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if (!$result) {
|
||||
$this->errors[] = $this->db->lasterror().' sql='.$sql;
|
||||
|
|
@ -1761,25 +1762,40 @@ class Contact extends CommonObject
|
|||
} else {
|
||||
if (count($this->roles) > 0) {
|
||||
foreach ($this->roles as $keyRoles => $valRoles) {
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_contacts";
|
||||
$sql .= " (entity,";
|
||||
$sql .= "date_creation,";
|
||||
$sql .= "fk_soc,";
|
||||
$sql .= "fk_c_type_contact,";
|
||||
$sql .= "fk_socpeople) ";
|
||||
$sql .= " VALUES (".$conf->entity.",";
|
||||
$sql .= "'".$this->db->idate(dol_now())."',";
|
||||
$sql .= $this->socid.", ";
|
||||
$sql .= $valRoles." , ";
|
||||
$sql .= $this->id;
|
||||
$sql .= ")";
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$idrole = 0;
|
||||
if (is_array($valRoles)) {
|
||||
$idrole = $valRoles['id'];
|
||||
} else {
|
||||
$idrole = $valRoles;
|
||||
}
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if (!$result)
|
||||
{
|
||||
$this->errors[] = $this->db->lasterror().' sql='.$sql;
|
||||
$error++;
|
||||
$socid = 0;
|
||||
if (is_array($valRoles)) {
|
||||
$socid = $valRoles['socid'];
|
||||
} else {
|
||||
$socid = $this->socid;
|
||||
}
|
||||
|
||||
if ($socid > 0) {
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_contacts";
|
||||
$sql .= " (entity,";
|
||||
$sql .= "date_creation,";
|
||||
$sql .= "fk_soc,";
|
||||
$sql .= "fk_c_type_contact,";
|
||||
$sql .= "fk_socpeople) ";
|
||||
$sql .= " VALUES (".$conf->entity.",";
|
||||
$sql .= "'".$this->db->idate(dol_now())."',";
|
||||
$sql .= $socid.", ";
|
||||
$sql .= $idrole." , ";
|
||||
$sql .= $this->id;
|
||||
$sql .= ")";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if (!$result)
|
||||
{
|
||||
$this->errors[] = $this->db->lasterror().' sql='.$sql;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -716,15 +716,13 @@ while ($i < min($num, $limit))
|
|||
$listsalesrepresentatives = $socstatic->getSalesRepresentatives($user);
|
||||
if ($listsalesrepresentatives < 0) dol_print_error($db);
|
||||
$nbofsalesrepresentative = count($listsalesrepresentatives);
|
||||
if ($nbofsalesrepresentative > 3) {
|
||||
if ($nbofsalesrepresentative > 6) {
|
||||
// We print only number
|
||||
print $nbofsalesrepresentative;
|
||||
} elseif ($nbofsalesrepresentative > 0)
|
||||
{
|
||||
} elseif ($nbofsalesrepresentative > 0) {
|
||||
$userstatic = new User($db);
|
||||
$j = 0;
|
||||
foreach ($listsalesrepresentatives as $val)
|
||||
{
|
||||
foreach ($listsalesrepresentatives as $val) {
|
||||
$userstatic->id = $val['id'];
|
||||
$userstatic->lastname = $val['lastname'];
|
||||
$userstatic->firstname = $val['firstname'];
|
||||
|
|
@ -732,11 +730,17 @@ while ($i < min($num, $limit))
|
|||
$userstatic->statut = $val['statut'];
|
||||
$userstatic->entity = $val['entity'];
|
||||
$userstatic->photo = $val['photo'];
|
||||
$userstatic->login = $val['login'];
|
||||
$userstatic->phone = $val['phone'];
|
||||
$userstatic->job = $val['job'];
|
||||
$userstatic->gender = $val['gender'];
|
||||
|
||||
//print '<div class="float">':
|
||||
print $userstatic->getNomUrl(-2);
|
||||
print ($nbofsalesrepresentative < 3) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
$j++;
|
||||
if ($j < $nbofsalesrepresentative) print ' ';
|
||||
if ($j < $nbofsalesrepresentative) {
|
||||
print ' ';
|
||||
}
|
||||
//print '</div>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
* \brief Code for actions on setting notes of object page
|
||||
*/
|
||||
|
||||
|
||||
// $error must have been initialized to 0
|
||||
// $action must be defined
|
||||
// $arrayofparameters must be set for action 'update'
|
||||
// $nomessageinupdate can be set to 1
|
||||
|
|
@ -31,7 +31,6 @@ if ($action == 'update' && is_array($arrayofparameters))
|
|||
{
|
||||
$db->begin();
|
||||
|
||||
$ok = true;
|
||||
foreach ($arrayofparameters as $key => $val)
|
||||
{
|
||||
// Modify constant only if key was posted (avoid resetting key to the null value)
|
||||
|
|
@ -40,7 +39,7 @@ if ($action == 'update' && is_array($arrayofparameters))
|
|||
$result = dolibarr_set_const($db, $key, GETPOST($key, 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
if ($result < 0)
|
||||
{
|
||||
$ok = false;
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -74,7 +73,7 @@ if ($action == 'setModuleOptions')
|
|||
if ($param)
|
||||
{
|
||||
$res = dolibarr_set_const($db, $param, $value, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -93,7 +92,11 @@ if ($action == 'setModuleOptions')
|
|||
if (!$tmpdir) {
|
||||
unset($listofdir[$key]); continue;
|
||||
}
|
||||
if (!is_dir($tmpdir)) $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0);
|
||||
if (!is_dir($tmpdir)) {
|
||||
if (empty($nomessageinsetmoduleoptions)) {
|
||||
setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$upload_dir = $tmpdir;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3668,7 +3668,7 @@ abstract class CommonObject
|
|||
* @param string $field_select name of field we need to get a list
|
||||
* @param string $field_where name of field of object we need to get linked items
|
||||
* @param string $table_element name of association table
|
||||
* @return array
|
||||
* @return array Array of record
|
||||
*/
|
||||
static public function getAllItemsLinkedByObjectID($fk_object_where, $field_select, $field_where, $table_element)
|
||||
{
|
||||
|
|
@ -3678,7 +3678,7 @@ abstract class CommonObject
|
|||
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT '.$field_select.' FROM '.MAIN_DB_PREFIX.$table_element.' WHERE '.$field_where.' = '.$fk_object_where;
|
||||
$sql = 'SELECT '.$field_select.' FROM '.MAIN_DB_PREFIX.$table_element.' WHERE '.$field_where.' = '.((int) $fk_object_where);
|
||||
$resql = $db->query($sql);
|
||||
|
||||
$TRes = array();
|
||||
|
|
@ -3697,7 +3697,7 @@ abstract class CommonObject
|
|||
* @param int $fk_object_where id of object we need to remove linked items
|
||||
* @param string $field_where name of field of object we need to delete linked items
|
||||
* @param string $table_element name of association table
|
||||
* @return int
|
||||
* @return int <0 if KO, 0 if nothing done, >0 if OK and something done
|
||||
*/
|
||||
static public function deleteAllItemsLinkedByObjectID($fk_object_where, $field_where, $table_element)
|
||||
{
|
||||
|
|
@ -6042,8 +6042,7 @@ abstract class CommonObject
|
|||
|
||||
$objectid = $this->id;
|
||||
|
||||
if ($computed)
|
||||
{
|
||||
if ($computed) {
|
||||
if (!preg_match('/^search_/', $keyprefix)) return '<span class="opacitymedium">'.$langs->trans("AutomaticallyCalculated").'</span>';
|
||||
else return '';
|
||||
}
|
||||
|
|
@ -6052,26 +6051,20 @@ abstract class CommonObject
|
|||
if (empty($morecss) && !empty($val['css'])) {
|
||||
$morecss = $val['css'];
|
||||
} elseif (empty($morecss)) {
|
||||
if ($type == 'date')
|
||||
{
|
||||
if ($type == 'date') {
|
||||
$morecss = 'minwidth100imp';
|
||||
} elseif ($type == 'datetime' || $type == 'link') // link means an foreign key to another primary id
|
||||
{
|
||||
} elseif ($type == 'datetime' || $type == 'link') { // link means an foreign key to another primary id
|
||||
$morecss = 'minwidth200imp';
|
||||
} elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type))
|
||||
{
|
||||
} elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) {
|
||||
$morecss = 'maxwidth75';
|
||||
} elseif ($type == 'url') {
|
||||
$morecss = 'minwidth400';
|
||||
} elseif ($type == 'boolean')
|
||||
{
|
||||
} elseif ($type == 'boolean') {
|
||||
$morecss = '';
|
||||
} else {
|
||||
if (round($size) < 12)
|
||||
{
|
||||
if (round($size) < 12) {
|
||||
$morecss = 'minwidth100';
|
||||
} elseif (round($size) <= 48)
|
||||
{
|
||||
} elseif (round($size) <= 48) {
|
||||
$morecss = 'minwidth200';
|
||||
} else {
|
||||
$morecss = 'minwidth400';
|
||||
|
|
@ -6468,13 +6461,13 @@ abstract class CommonObject
|
|||
|
||||
if (!preg_match('/search_/', $keyprefix)) {
|
||||
if (!empty($param_list_array[2])) { // If the entry into $fields is set to add a create button
|
||||
if ($this->fields[$key]['picto']) {
|
||||
if (!empty($this->fields[$key]['picto'])) {
|
||||
$morecss .= ' widthcentpercentminusxx';
|
||||
} else {
|
||||
$morecss .= ' widthcentpercentminusx';
|
||||
}
|
||||
} else {
|
||||
if ($this->fields[$key]['picto']) {
|
||||
if (!empty($this->fields[$key]['picto'])) {
|
||||
$morecss .= ' widthcentpercentminusx';
|
||||
}
|
||||
}
|
||||
|
|
@ -7136,12 +7129,36 @@ abstract class CommonObject
|
|||
var parent = $(this).find("option[parent]:first").attr("parent");
|
||||
var infos = parent.split(":");
|
||||
var parent_list = infos[0];
|
||||
|
||||
//Hide daughters lists
|
||||
if ($("#"+child_list).val() == 0 && $("#"+parent_list).val() == 0){
|
||||
$("#"+child_list).hide();
|
||||
//Show mother lists
|
||||
} else if ($("#"+parent_list).val() != 0){
|
||||
$("#"+parent_list).show();
|
||||
}
|
||||
//Show the child list if the parent list value is selected
|
||||
$("select[name=\""+parent_list+"\"]").click(function() {
|
||||
if ($(this).val() != 0){
|
||||
$("#"+child_list).show()
|
||||
}
|
||||
});
|
||||
|
||||
//When we change parent list
|
||||
$("select[name=\""+parent_list+"\"]").change(function() {
|
||||
showOptions(child_list, parent_list, orig_select[child_list]);
|
||||
//Select the value 0 on child list after a change on the parent list
|
||||
$("#"+child_list).val(0).trigger("change");
|
||||
//Hide child lists if the parent value is set to 0
|
||||
if ($(this).val() == 0){
|
||||
$("#"+child_list).hide();
|
||||
}
|
||||
|
||||
$("select[name=\""+parent_list+"\"]").change(function() {
|
||||
showOptions(child_list, parent_list, orig_select[child_list]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
setListDependencies();
|
||||
});
|
||||
</script>'."\n";
|
||||
|
|
|
|||
|
|
@ -4052,8 +4052,7 @@ class Form
|
|||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
if ($selected == $obj->rowid || ($useempty == 2 && $num == 1 && empty($selected)))
|
||||
{
|
||||
if ($selected == $obj->rowid || ($useempty == 2 && $num == 1 && empty($selected))) {
|
||||
$out .= '<option value="'.$obj->rowid.'" selected>';
|
||||
} else {
|
||||
$out .= '<option value="'.$obj->rowid.'">';
|
||||
|
|
|
|||
|
|
@ -1174,7 +1174,9 @@ class FormFile
|
|||
print_liste_field_titre('Size', $url, "size", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('Date', $url, "date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (empty($useinecm) || $useinecm == 4 || $useinecm == 5 || $useinecm == 6) print_liste_field_titre('', $url, "", "", $param, '', $sortfield, $sortorder, 'center '); // Preview
|
||||
// Shared or not - Hash of file
|
||||
print_liste_field_titre('');
|
||||
// Action button
|
||||
print_liste_field_titre('');
|
||||
if (!$disablemove) print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
|
|
@ -1285,12 +1287,10 @@ class FormFile
|
|||
print '</td>';
|
||||
}
|
||||
|
||||
// Hash of file (only if we are in a mode where a scan of dir were done and we have id of file in ECM table)
|
||||
// Shared or not - Hash of file
|
||||
print '<td class="center">';
|
||||
if ($relativedir && $filearray[$key]['rowid'] > 0)
|
||||
{
|
||||
if ($editline)
|
||||
{
|
||||
if ($relativedir && $filearray[$key]['rowid'] > 0) { // only if we are in a mode where a scan of dir were done and we have id of file in ECM table
|
||||
if ($editline) {
|
||||
print $langs->trans("FileSharedViaALink").' ';
|
||||
print '<input class="inline-block" type="checkbox" name="shareenabled"'.($file['share'] ? ' checked="checked"' : '').' /> ';
|
||||
} else {
|
||||
|
|
@ -1318,7 +1318,7 @@ class FormFile
|
|||
}
|
||||
print '</td>';
|
||||
|
||||
// Actions buttons
|
||||
// Actions buttons (1 column or 2 if !disablemove)
|
||||
if (!$editline)
|
||||
{
|
||||
// Delete or view link
|
||||
|
|
@ -1406,6 +1406,7 @@ class FormFile
|
|||
else print $textifempty;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
|
|
@ -1479,7 +1480,7 @@ class FormFile
|
|||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
// Action column
|
||||
print '<td class="liste_titre center">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
|
@ -1493,7 +1494,7 @@ class FormFile
|
|||
print_liste_field_titre("Documents2", $url, "name", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Size", $url, "size", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Date", $url, "date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre('', '', '');
|
||||
print_liste_field_titre("Shared", $url, 'share', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
print '</tr>'."\n";
|
||||
|
||||
// To show ref or specific information according to view to show (defined by $module)
|
||||
|
|
@ -1582,7 +1583,7 @@ class FormFile
|
|||
//var_dump($sortfield.' - '.$sortorder);
|
||||
if ($sortfield && $sortorder) // If $sortfield is for example 'position_name', we will sort on the property 'position_name' (that is concat of position+name)
|
||||
{
|
||||
$filearray = dol_sort_array($filearray, $sortfield, $sortorder);
|
||||
$filearray = dol_sort_array($filearray, $sortfield, $sortorder, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1714,7 +1715,7 @@ class FormFile
|
|||
$fulllink = $urlwithroot.'/document.php'.($paramlink ? '?'.$paramlink : '');
|
||||
|
||||
print img_picto($langs->trans("FileSharedViaALink"), 'globe').' ';
|
||||
print '<input type="text" class="quatrevingtpercent width100" id="downloadlink" name="downloadexternallink" value="'.dol_escape_htmltag($fulllink).'">';
|
||||
print '<input type="text" class="quatrevingtpercent width100 nopadding" id="downloadlink" name="downloadexternallink" value="'.dol_escape_htmltag($fulllink).'">';
|
||||
}
|
||||
//if (! empty($useinecm) && $useinecm != 6) print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?modulepart='.$modulepart;
|
||||
//if ($forcedownload) print '&attachment=1';
|
||||
|
|
@ -1722,7 +1723,9 @@ class FormFile
|
|||
//print img_view().'</a> ';
|
||||
//if ($permissiontodelete) print '<a href="'.$url.'?id='.$object->id.'§ion='.$_REQUEST["section"].'&action=delete&token='.newToken().'&urlfile='.urlencode($file['name']).'">'.img_delete().'</a>';
|
||||
//else print ' ';
|
||||
print "</td></tr>\n";
|
||||
print "</td>";
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ class FormProjets
|
|||
if (empty($option_only) && !empty($conf->use_javascript_ajax))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
|
||||
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
|
||||
$out .= $comboenhancement;
|
||||
$morecss = 'minwidth200 maxwidth500';
|
||||
}
|
||||
|
|
@ -388,7 +388,7 @@ class FormProjets
|
|||
continue;
|
||||
}
|
||||
|
||||
$labeltoshow = '';
|
||||
$labeltoshow = ''; $titletoshow = '';
|
||||
|
||||
$disabled = 0;
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT)
|
||||
|
|
@ -408,32 +408,39 @@ class FormProjets
|
|||
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("SharedProject").')';
|
||||
//else $labeltoshow.=' ('.$langs->trans("Private").')';
|
||||
$labeltoshow .= ' '.dol_trunc($obj->title, $maxlength);
|
||||
$titletoshow = $labeltoshow;
|
||||
|
||||
if ($obj->name) $labeltoshow .= ' ('.$obj->name.')';
|
||||
if ($obj->name) {
|
||||
$labeltoshow .= ' ('.$obj->name.')';
|
||||
$titletoshow .= ' <span class="opacitymedium">('.$obj->name.')</span>';
|
||||
}
|
||||
|
||||
$disabled = 0;
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT)
|
||||
{
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT) {
|
||||
$disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("Draft");
|
||||
} elseif ($obj->fk_statut == Project::STATUS_CLOSED)
|
||||
{
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("Draft").'</span>';
|
||||
} elseif ($obj->fk_statut == Project::STATUS_CLOSED) {
|
||||
if ($discard_closed == 2) $disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("Closed");
|
||||
} elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid))
|
||||
{
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("Closed").'</span>';
|
||||
} elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) {
|
||||
$disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("LinkedToAnotherCompany");
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("LinkedToAnotherCompany").'</span>';
|
||||
}
|
||||
$labeltoshow .= ' - ';
|
||||
$titletoshow .= ' - ';
|
||||
}
|
||||
|
||||
// Label for task
|
||||
$labeltoshow .= $obj->tref.' '.dol_trunc($obj->tlabel, $maxlength);
|
||||
$titletoshow .= $obj->tref.' '.dol_trunc($obj->tlabel, $maxlength);
|
||||
|
||||
if (!empty($selected) && $selected == $obj->rowid)
|
||||
{
|
||||
$out .= '<option value="'.$obj->rowid.'" selected';
|
||||
$out .= ' data-html="'.dol_escape_htmltag($titletoshow).'"';
|
||||
//if ($disabled) $out.=' disabled'; // with select2, field can't be preselected if disabled
|
||||
$out .= '>'.$labeltoshow.'</option>';
|
||||
} else {
|
||||
|
|
@ -445,6 +452,7 @@ class FormProjets
|
|||
if ($disabled) $resultat .= ' disabled';
|
||||
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("Public").')';
|
||||
//else $labeltoshow.=' ('.$langs->trans("Private").')';
|
||||
$resultat .= ' data-html="'.dol_escape_htmltag($titletoshow).'"';
|
||||
$resultat .= '>';
|
||||
$resultat .= $labeltoshow;
|
||||
$resultat .= '</option>';
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ class FormTicket
|
|||
{
|
||||
$formproject = new FormProjets($this->db);
|
||||
print '<tr><td><label for="project"><span class="">'.$langs->trans("Project").'</span></label></td><td>';
|
||||
print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
print img_picto('', 'project').$formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ class Utils
|
|||
if (!empty($dolibarr_main_db_pass))
|
||||
{
|
||||
$paramcrypted .= ' -p"'.preg_replace('/./i', '*', $dolibarr_main_db_pass).'"';
|
||||
$paramclear .= ' -p"'.str_replace(array('"', '`'), array('\"', '\`'), $dolibarr_main_db_pass).'"';
|
||||
$paramclear .= ' -p"'.str_replace(array('"', '`', '$'), array('\"', '\`', '\$'), $dolibarr_main_db_pass).'"';
|
||||
}
|
||||
|
||||
$handle = '';
|
||||
|
|
|
|||
|
|
@ -37,20 +37,26 @@ class DoliDBPgsql extends DoliDB
|
|||
{
|
||||
//! Database type
|
||||
public $type = 'pgsql'; // Name of manager
|
||||
|
||||
//! Database label
|
||||
const LABEL = 'PostgreSQL'; // Label of manager
|
||||
|
||||
//! Charset
|
||||
public $forcecharset = 'UTF8'; // Can't be static as it may be forced with a dynamic value
|
||||
|
||||
//! Collate used to force collate when creating database
|
||||
public $forcecollate = ''; // Can't be static as it may be forced with a dynamic value
|
||||
|
||||
//! Version min database
|
||||
const VERSIONMIN = '9.0.0'; // Version min database
|
||||
/** @var resource Resultset of last query */
|
||||
|
||||
/** @var resource|boolean Resultset of last query */
|
||||
private $_results;
|
||||
|
||||
public $unescapeslashquot;
|
||||
public $standard_conforming_strings;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* This create an opened connexion to a database server and eventually to a database
|
||||
|
|
|
|||
|
|
@ -1870,11 +1870,6 @@ function email_admin_prepare_head()
|
|||
}
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/mails_templates.php";
|
||||
$head[$h][1] = $langs->trans("EMailTemplates");
|
||||
$head[$h][2] = 'templates';
|
||||
$h++;
|
||||
|
||||
if (!empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) {
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/mails_senderprofile_list.php";
|
||||
$head[$h][1] = $langs->trans("EmailSenderProfiles");
|
||||
|
|
@ -1882,6 +1877,11 @@ function email_admin_prepare_head()
|
|||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/mails_templates.php";
|
||||
$head[$h][1] = $langs->trans("EMailTemplates");
|
||||
$head[$h][2] = 'templates';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'email_admin', 'remove');
|
||||
|
||||
return $head;
|
||||
|
|
|
|||
|
|
@ -686,7 +686,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
|||
$out = dol_string_nohtmltag($out, 0);
|
||||
}
|
||||
break;
|
||||
case 'alphawithlgt': // No " and no ../ but we keep < > tags. Can be used for email string like "Name <email>"
|
||||
case 'alphawithlgt': // No " and no ../ but we keep balanced < > tags with no special chars inside. Can be used for email string like "Name <email>"
|
||||
if (!is_array($out)) {
|
||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||
// '../' is dangerous because it allows dir transversals
|
||||
|
|
@ -3268,7 +3268,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'lot',
|
||||
'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next',
|
||||
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
|
||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
|
||||
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
|
||||
|
|
@ -5762,7 +5762,7 @@ function picto_required()
|
|||
* @param string $stringtoclean String to clean
|
||||
* @param integer $removelinefeed 1=Replace all new lines by 1 space, 0=Only ending new lines are removed others are replaced with \n, 2=Ending new lines are removed but others are kept with a same number of \n than nb of <br> when there is both "...<br>\n..."
|
||||
* @param string $pagecodeto Encoding of input/output string
|
||||
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag)
|
||||
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag or when tags is not closed like '<img onload=aaa')
|
||||
* @param integer $removedoublespaces Replace double space into one space
|
||||
* @return string String cleaned
|
||||
*
|
||||
|
|
@ -5783,10 +5783,10 @@ function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto =
|
|||
} else {
|
||||
$pattern = "/<[^<>]+>/";
|
||||
// Example of $temp: <a href="/myurl" title="<u>A title</u>">0000-021</a>
|
||||
$temp = preg_replace($pattern, "", $temp); // pass 1
|
||||
// $temp after pass 1: <a href="/myurl" title="A title">0000-021
|
||||
$temp = preg_replace($pattern, "", $temp); // pass 2
|
||||
// $temp after pass 2: 0000-021
|
||||
$temp = preg_replace($pattern, "", $temp); // pass 1 - $temp after pass 1: <a href="/myurl" title="A title">0000-021
|
||||
$temp = preg_replace($pattern, "", $temp); // pass 2 - $temp after pass 2: 0000-021
|
||||
// removed '<' into non closing html tags like '<a'
|
||||
$temp = preg_replace('/<(\w+)/', '\1', $temp);
|
||||
}
|
||||
|
||||
$temp = dol_html_entity_decode($temp, ENT_COMPAT, $pagecodeto);
|
||||
|
|
@ -7144,7 +7144,7 @@ function dol_htmloutput_errors($mesgstring = '', $mesgarray = array(), $keepembe
|
|||
* @param array $array Array to sort (array of array('key1'=>val1,'key2'=>val2,'key3'...) or array of objects)
|
||||
* @param string $index Key in array to use for sorting criteria
|
||||
* @param int $order Sort order ('asc' or 'desc')
|
||||
* @param int $natsort 1=use "natural" sort (natsort), 0=use "standard" sort (asort)
|
||||
* @param int $natsort 1=use "natural" sort (natsort) for a search criteria thats is strings or unknown, 0=use "standard" sort (asort) for numbers
|
||||
* @param int $case_sensitive 1=sort is case sensitive, 0=not case sensitive
|
||||
* @param int $keepindex If 0 and index key of array to sort is a numeric, than index will be rewrote. If 1 or index key is not numeric, key for index is kept after sorting.
|
||||
* @return array Sorted array
|
||||
|
|
@ -7170,9 +7170,17 @@ function dol_sort_array(&$array, $index, $order = 'asc', $natsort = 0, $case_sen
|
|||
}
|
||||
|
||||
if (!$natsort) {
|
||||
($order == 'asc') ? asort($temp) : arsort($temp);
|
||||
if ($order == 'asc') {
|
||||
asort($temp);
|
||||
} else {
|
||||
arsort($temp);
|
||||
}
|
||||
} else {
|
||||
($case_sensitive) ? natsort($temp) : natcasesort($temp);
|
||||
if ($case_sensitive) {
|
||||
natsort($temp);
|
||||
} else {
|
||||
natcasesort($temp); // natecasesort is not sensible to case
|
||||
}
|
||||
if ($order != 'asc') $temp = array_reverse($temp, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -476,6 +476,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->title = $lines[$i]->projectlabel;
|
||||
$projectstatic->usage_bill_time = $lines[$i]->usage_bill_time;
|
||||
$projectstatic->status = $lines[$i]->projectstatus;
|
||||
|
||||
$taskstatic->id = $lines[$i]->id;
|
||||
$taskstatic->ref = $lines[$i]->ref;
|
||||
|
|
@ -881,6 +882,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
|||
$projectstatic->ref = $lines[$i]->project_ref;
|
||||
$projectstatic->title = $lines[$i]->project_label;
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->status = $lines[$i]->project_status;
|
||||
|
||||
$taskstatic->id = $lines[$i]->task_id;
|
||||
$taskstatic->ref = ($lines[$i]->task_ref ? $lines[$i]->task_ref : $lines[$i]->task_id);
|
||||
|
|
@ -1116,6 +1118,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
|||
$projectstatic->ref = $lines[$i]->projectref;
|
||||
$projectstatic->title = $lines[$i]->projectlabel;
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->status = $lines[$i]->projectstatus;
|
||||
|
||||
$taskstatic->id = $lines[$i]->id;
|
||||
$taskstatic->ref = ($lines[$i]->ref ? $lines[$i]->ref : $lines[$i]->id);
|
||||
|
|
@ -1489,6 +1492,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||
$projectstatic->title = $lines[$i]->projectlabel;
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->thirdparty_name = $lines[$i]->thirdparty_name;
|
||||
$projectstatic->status = $lines[$i]->projectstatus;
|
||||
|
||||
$taskstatic->id = $lines[$i]->id;
|
||||
$taskstatic->ref = ($lines[$i]->ref ? $lines[$i]->ref : $lines[$i]->id);
|
||||
|
|
@ -1843,6 +1847,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||
$projectstatic->title = $lines[$i]->projectlabel;
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->thirdparty_name = $lines[$i]->thirdparty_name;
|
||||
$projectstatic->status = $lines[$i]->projectstatus;
|
||||
|
||||
$taskstatic->id = $lines[$i]->id;
|
||||
$taskstatic->ref = ($lines[$i]->ref ? $lines[$i]->ref : $lines[$i]->id);
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ function dolSaveMasterFile($filemaster)
|
|||
}
|
||||
|
||||
/**
|
||||
* Save content of a page on disk.
|
||||
* It can save file into root directory or into language subdirectory.
|
||||
* Save an alias page on disk (A page that include the reference page).
|
||||
* It saves file into the root directory but also into language subdirectory.
|
||||
*
|
||||
* @param string $filealias Full path of filename to generate
|
||||
* @param Website $object Object website
|
||||
|
|
@ -82,7 +82,7 @@ function dolSavePageAlias($filealias, $object, $objectpage)
|
|||
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
|
||||
// Save also alias into language subdirectory if we have to
|
||||
// Save also alias into language subdirectory if it is not a main language
|
||||
if ($objectpage->lang && in_array($objectpage->lang, explode(',', $object->otherlang))) {
|
||||
$dirname = dirname($filealias);
|
||||
$filename = basename($filealias);
|
||||
|
|
@ -102,14 +102,38 @@ function dolSavePageAlias($filealias, $object, $objectpage)
|
|||
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
}
|
||||
// Save also alias into all language subdirectories if it is a main language
|
||||
elseif (empty($objectpage->lang) || !in_array($objectpage->lang, explode(',', $object->otherlang))) {
|
||||
if (empty($conf->global->WEBSITE_DISABLE_MAIN_LANGUAGE_INTO_LANGSUBDIR)) {
|
||||
$dirname = dirname($filealias);
|
||||
$filename = basename($filealias);
|
||||
foreach (explode(',', $object->otherlang) as $sublang) {
|
||||
$filealias = $dirname.'/'.$sublang.'/'.$filename;
|
||||
|
||||
$aliascontent = '<?php'."\n";
|
||||
$aliascontent .= "// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page\n";
|
||||
$aliascontent .= 'global $dolibarr_main_data_root;'."\n";
|
||||
$aliascontent .= 'if (empty($dolibarr_main_data_root)) require \'../page'.$objectpage->id.'.tpl.php\'; ';
|
||||
$aliascontent .= 'else require $dolibarr_main_data_root.\'/website/\'.$website->ref.\'/page'.$objectpage->id.'.tpl.php\';'."\n";
|
||||
$aliascontent .= '?>'."\n";
|
||||
$result = file_put_contents($filealias, $aliascontent);
|
||||
if ($result === false) {
|
||||
dol_syslog("Failed to write file ".$filealias, LOG_WARNING);
|
||||
}
|
||||
if (!empty($conf->global->MAIN_UMASK)) {
|
||||
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ($result ?true:false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Save content of a page on disk.
|
||||
* Page contents are always saved into root directory.
|
||||
* Save content of a page on disk (page name is generally ID_of_page.php).
|
||||
* Page contents are always saved into "root" directory. Only aliases pages saved with dolSavePageAlias() can be in root or language subdir.
|
||||
*
|
||||
* @param string $filetpl Full path of filename to generate
|
||||
* @param Website $object Object website
|
||||
|
|
@ -230,10 +254,11 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage)
|
|||
|
||||
//var_dump($filetpl);exit;
|
||||
$result = file_put_contents($filetpl, $tplcontent);
|
||||
if (!empty($conf->global->MAIN_UMASK))
|
||||
if (!empty($conf->global->MAIN_UMASK)) {
|
||||
@chmod($filetpl, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
|
||||
return $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -99,9 +99,9 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
|||
$tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("BarCode"), $langs->transnoentities("BarCode"));
|
||||
$tooltip .= $langs->trans("GenericMaskCodes3");
|
||||
$tooltip .= '<strong>'.$langs->trans("Example").':</strong><br>';
|
||||
$tooltip .= '020{000000000} (for internal use)<br>';
|
||||
$tooltip .= '9771234{00000} (example of ISSN code with prefix 1234)<br>';
|
||||
$tooltip .= '9791234{00000} (example of ISMN code with prefix 1234)<br>';
|
||||
$tooltip .= '020{000000000}? (for internal use)<br>';
|
||||
$tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)<br>';
|
||||
$tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)<br>';
|
||||
//$tooltip.=$langs->trans("GenericMaskCodes5");
|
||||
|
||||
// Mask parameter
|
||||
|
|
@ -140,7 +140,37 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
|||
|
||||
return $examplebarcode;
|
||||
}
|
||||
/**
|
||||
* Return literal barcode type code from numerical rowid type of barcode
|
||||
*
|
||||
* @param Database $db Database
|
||||
* @param int $type Type of barcode (EAN, ISBN, ...) as rowid
|
||||
* @return string
|
||||
*/
|
||||
public function literalBarcodeType($db, $type = '')
|
||||
{
|
||||
global $conf;
|
||||
$out = '';
|
||||
|
||||
$sql = "SELECT rowid, code, libelle as label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
|
||||
$sql .= " WHERE rowid = '".$db->escape($type)."'";
|
||||
$sql .= " AND entity = ".((int) $conf->entity);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
if ($num > 0) {
|
||||
$obj = $db->fetch_object($result);
|
||||
$out .= $obj->label; //take the label corresponding to the type rowid in the database
|
||||
}
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
|
|
@ -153,6 +183,11 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
|||
global $db, $conf;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // to be able to call function barcode_gen_ean_sum($ean)
|
||||
|
||||
if (empty($type)) {
|
||||
$type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE;
|
||||
} //get barcode type configuration for products if $type not set
|
||||
|
||||
// TODO
|
||||
|
||||
|
|
@ -171,7 +206,28 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
|||
$now = dol_now();
|
||||
|
||||
$numFinal = get_next_value($db, $mask, 'product', $field, $where, '', $now);
|
||||
|
||||
//Begin barcode with key: for barcode with key (EAN13...) calculate and substitute the last character (* or ?) used in the mask by the key
|
||||
if ((substr($numFinal, -1)=='*') or (substr($numFinal, -1)=='?')) // if last mask character is * or ? a joker, probably we have to calculate a key as last character (EAN13...)
|
||||
{
|
||||
$literaltype = '';
|
||||
$literaltype = $this->literalBarcodeType($db, $type);//get literal_Barcode_Type
|
||||
switch ($literaltype)
|
||||
{
|
||||
case 'EAN13': //EAN13 rowid = 2
|
||||
if (strlen($numFinal)==13)// be sure that the mask length is correct for EAN13
|
||||
{
|
||||
$ean = substr($numFinal, 0, 12); //take first 12 digits
|
||||
$eansum = barcode_gen_ean_sum($ean);
|
||||
$ean .= $eansum; //substitute the las character by the key
|
||||
$numFinal = $ean;
|
||||
}
|
||||
break;
|
||||
// Other barcode cases with key could be written here
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//End barcode with key
|
||||
return $numFinal;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -340,13 +340,12 @@ class pdf_strato extends ModelePDFContract
|
|||
$datere = $langs->trans("Unknown");
|
||||
}
|
||||
|
||||
$txtpredefinedservice = '';
|
||||
$txtpredefinedservice = $objectligne->product_label;
|
||||
if ($objectligne->product_label)
|
||||
{
|
||||
$txtpredefinedservice .= ' - ';
|
||||
$txtpredefinedservice .= $objectligne->product_label;
|
||||
}
|
||||
$txtpredefinedservice = $objectligne->product_ref;
|
||||
if ($objectligne->product_label)
|
||||
{
|
||||
$txtpredefinedservice .= ' - ';
|
||||
$txtpredefinedservice .= $objectligne->product_label;
|
||||
}
|
||||
|
||||
$desc = dol_htmlentitiesbr($objectligne->desc, 1); // Desc (not empty for free lines)
|
||||
$txt = '';
|
||||
|
|
|
|||
|
|
@ -197,15 +197,25 @@ class modSociete extends DolibarrModules
|
|||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||
$this->rights[$r][4] = 'export';
|
||||
|
||||
// 262 : Resteindre l'acces des commerciaux
|
||||
// 262 : Restrict access to sales representative
|
||||
$r++;
|
||||
$this->rights[$r][0] = 262;
|
||||
$this->rights[$r][1] = 'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).';
|
||||
$this->rights[$r][1] = 'Read all third parties (and their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'client';
|
||||
$this->rights[$r][5] = 'voir';
|
||||
|
||||
/*
|
||||
$r++;
|
||||
$this->rights[$r][0] = 263;
|
||||
$this->rights[$r][1] = 'Read all third parties (without their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'client';
|
||||
$this->rights[$r][5] = 'readallthirdparties_advance';
|
||||
*/
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 281; // id de la permission
|
||||
$this->rights[$r][1] = 'Read contacts'; // libelle de la permission
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
|
|||
$mode_search = 0;
|
||||
if (in_array($typ, array('int', 'double', 'real', 'price'))) $mode_search = 1; // Search on a numeric
|
||||
if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1') $mode_search = 2; // Search on a foreign key int
|
||||
if (in_array($typ, array('sellist')) && !is_numeric($crit)) $mode_search = 0;// Search on a foreign key string
|
||||
if (in_array($typ, array('chkbxlst', 'checkbox'))) $mode_search = 4; // Search on a multiselect field with sql type = text
|
||||
if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string
|
||||
elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) {
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ if ($action == 'set_DONATION_ACCOUNTINGACCOUNT')
|
|||
|
||||
$res = dolibarr_set_const($db, "DONATION_ACCOUNTINGACCOUNT", $account, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
@ -134,7 +134,7 @@ if ($action == 'set_DONATION_MESSAGE')
|
|||
|
||||
$res = dolibarr_set_const($db, "DONATION_MESSAGE", $freemessage, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
if (!($res > 0)) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -820,11 +820,17 @@ IMG;
|
|||
// Export to PDF using LibreOffice
|
||||
if ($conf->global->MAIN_ODT_AS_PDF == 'libreoffice')
|
||||
{
|
||||
dol_mkdir($conf->user->dir_temp); // We must be sure the directory exists and is writable
|
||||
|
||||
// We delete and recreate a subdir because the soffice may have change pemrissions on it
|
||||
dol_delete_dir_recursive($conf->user->dir_temp.'/odtaspdf');
|
||||
dol_mkdir($conf->user->dir_temp.'/odtaspdf');
|
||||
|
||||
// Install prerequisites: apt install soffice libreoffice-common libreoffice-writer
|
||||
// using windows libreoffice that must be in path
|
||||
// using linux/mac libreoffice that must be in path
|
||||
// Note PHP Config "fastcgi.impersonate=0" must set to 0 - Default is 1
|
||||
$command ='soffice --headless -env:UserInstallation=file:"//'.$conf->user->dir_temp.'" --convert-to pdf --outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
|
||||
$command ='soffice --headless -env:UserInstallation=file:\''.$conf->user->dir_temp.'/odtaspdf\' --convert-to pdf --outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
|
||||
}
|
||||
elseif (preg_match('/unoconv/', $conf->global->MAIN_ODT_AS_PDF))
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -343,6 +343,7 @@ ALTER TABLE llx_commande_fournisseurdet ADD INDEX idx_commande_fournisseurdet_fk
|
|||
|
||||
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode MODIFY COLUMN tracking varchar(255) NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_shipment_mode ALTER COLUMN tracking DROP NOT NULL;
|
||||
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (9,'INPERSON', 'In person at your site', NULL, NULL, 0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (10,'FEDEX', 'Fedex', NULL, 'https://www.fedex.com/apps/fedextrack/index.html?tracknumbers={TRACKID}', 0);
|
||||
|
|
|
|||
|
|
@ -1,568 +0,0 @@
|
|||
--
|
||||
-- Be carefull to requests order.
|
||||
-- This file must be loaded by calling /install/index.php page
|
||||
-- when current version is 13.0.0 or higher.
|
||||
--
|
||||
-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y
|
||||
-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y
|
||||
-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
|
||||
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
|
||||
-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
|
||||
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
|
||||
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
|
||||
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
|
||||
-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field);
|
||||
-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table
|
||||
-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex
|
||||
-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
||||
-- To make pk to be auto increment (postgres):
|
||||
-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid;
|
||||
-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid);
|
||||
-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq');
|
||||
-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table;
|
||||
-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL;
|
||||
-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL;
|
||||
-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL;
|
||||
-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL;
|
||||
-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
|
||||
-- Note: fields with type BLOB/TEXT can't have default value.
|
||||
|
||||
|
||||
-- Missing in v12 or lower
|
||||
|
||||
ALTER TABLE llx_payment_salary MODIFY COLUMN ref varchar(30) NULL;
|
||||
ALTER TABLE llx_payment_various MODIFY COLUMN ref varchar(30) NULL;
|
||||
|
||||
ALTER TABLE llx_prelevement_bons ADD COLUMN type varchar(16) DEFAULT 'debit-order';
|
||||
|
||||
ALTER TABLE llx_prelevement_facture CHANGE COLUMN fk_facture_foun fk_facture_fourn integer NULL;
|
||||
|
||||
ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture (fk_facture);
|
||||
ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture_fourn (fk_facture_fourn);
|
||||
|
||||
ALTER TABLE llx_document_model MODIFY COLUMN type varchar(64);
|
||||
|
||||
ALTER TABLE llx_bom_bom MODIFY COLUMN duration double(24,8);
|
||||
|
||||
ALTER TABLE llx_bom_bom_extrafields ADD INDEX idx_bom_bom_extrafields_fk_object (fk_object);
|
||||
|
||||
create table llx_mrp_mo_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_mrp_mo_extrafields DROP INDEX idx_fk_object;
|
||||
|
||||
ALTER TABLE llx_mrp_mo_extrafields ADD INDEX idx_mrp_mo_fk_object(fk_object);
|
||||
|
||||
|
||||
-- For v13
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (111,11, '0','0','No Sales Tax',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (112,11, '4','0','Sales Tax 4%',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (113,11, '6','0','Sales Tax 6%',1);
|
||||
|
||||
ALTER TABLE llx_bom_bom ADD COLUMN bomtype integer DEFAULT 0;
|
||||
|
||||
UPDATE llx_emailcollector_emailcollector SET ref = 'Collect_Ticket_Requests' WHERE ref = 'Collect_Ticket_Requets';
|
||||
UPDATE llx_emailcollector_emailcollector SET ref = 'Collect_Responses_In' WHERE ref = 'Collect_Responses';
|
||||
|
||||
|
||||
UPDATE llx_document_model set nom = 'standard' where nom = 'Standard' and type ='stock';
|
||||
UPDATE llx_document_model set nom = 'stdmovement', type = 'movement' where nom = 'StdMouvement' and type ='mouvement';
|
||||
|
||||
|
||||
UPDATE llx_const SET value = 0 WHERE name = 'FACTURE_TVAOPTION' and value = 'franchise';
|
||||
UPDATE llx_const SET value = 1 WHERE name = 'FACTURE_TVAOPTION' and value <> 'franchise' AND value <> '0' AND value <> '1';
|
||||
|
||||
ALTER TABLE llx_commande MODIFY COLUMN date_livraison DATETIME;
|
||||
|
||||
ALTER TABLE llx_website ADD COLUMN position integer DEFAULT 0;
|
||||
|
||||
ALTER TABLE llx_establishment ADD COLUMN ref varchar(30);
|
||||
ALTER TABLE llx_establishment ADD COLUMN label varchar(128);
|
||||
UPDATE llx_establishment SET ref = rowid WHERE ref IS NULL;
|
||||
ALTER TABLE llx_establishment MODIFY COLUMN ref varchar(30) NOT NULL;
|
||||
ALTER TABLE llx_establishment MODIFY COLUMN label varchar(128);
|
||||
|
||||
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0);
|
||||
|
||||
ALTER TABLE llx_subscription MODIFY COLUMN datef DATETIME;
|
||||
|
||||
ALTER TABLE llx_loan_schedule ADD column fk_payment_loan INTEGER;
|
||||
|
||||
|
||||
ALTER TABLE llx_user DROP COLUMN jabberid;
|
||||
ALTER TABLE llx_user DROP COLUMN skype;
|
||||
ALTER TABLE llx_user DROP COLUMN twitter;
|
||||
ALTER TABLE llx_user DROP COLUMN facebook;
|
||||
ALTER TABLE llx_user DROP COLUMN linkedin;
|
||||
ALTER TABLE llx_user DROP COLUMN instagram;
|
||||
ALTER TABLE llx_user DROP COLUMN snapchat;
|
||||
ALTER TABLE llx_user DROP COLUMN googleplus;
|
||||
ALTER TABLE llx_user DROP COLUMN youtube;
|
||||
ALTER TABLE llx_user DROP COLUMN whatsapp;
|
||||
|
||||
ALTER TABLE llx_user ADD COLUMN datelastpassvalidation datetime;
|
||||
ALTER TABLE llx_user ADD COLUMN datestartvalidity datetime;
|
||||
ALTER TABLE llx_user ADD COLUMN dateendvalidity datetime;
|
||||
|
||||
ALTER TABLE llx_user ADD COLUMN idpers1 varchar(128);
|
||||
ALTER TABLE llx_user ADD COLUMN idpers2 varchar(128);
|
||||
ALTER TABLE llx_user ADD COLUMN idpers3 varchar(128);
|
||||
|
||||
|
||||
-- Intracomm Report
|
||||
CREATE TABLE llx_c_transport_mode (
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
code varchar(3) NOT NULL,
|
||||
label varchar(255) NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('ROU', 'Transport par route', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('AIR', 'Transport par air', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('POS', 'Envois postaux', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('OLE', 'Installations de transport fixe (oléoduc)', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('NAV', 'Transport par navigation intérieure', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('PRO', 'Propulsion propre', 1);
|
||||
|
||||
ALTER TABLE llx_facture ADD COLUMN fk_transport_mode integer after location_incoterms;
|
||||
ALTER TABLE llx_facture_fourn ADD COLUMN fk_transport_mode integer after location_incoterms;
|
||||
|
||||
ALTER TABLE llx_societe ADD COLUMN transport_mode tinyint after cond_reglement;
|
||||
ALTER TABLE llx_societe ADD COLUMN transport_mode_supplier tinyint after cond_reglement_supplier;
|
||||
|
||||
CREATE TABLE llx_intracommreport
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
|
||||
ref varchar(30) NOT NULL, -- report reference number
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
type_declaration varchar(32),
|
||||
periods varchar(32),
|
||||
mode varchar(32),
|
||||
content_xml text,
|
||||
type_export varchar(10),
|
||||
datec datetime,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_incoterms ADD COLUMN label varchar(100) NULL;
|
||||
|
||||
CREATE TABLE llx_recruitment_recruitmentjobposition(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
||||
entity INTEGER DEFAULT 1 NOT NULL,
|
||||
label varchar(255) NOT NULL,
|
||||
qty integer DEFAULT 1 NOT NULL,
|
||||
fk_soc integer,
|
||||
fk_project integer,
|
||||
fk_user_recruiter integer,
|
||||
fk_user_supervisor integer,
|
||||
fk_establishment integer,
|
||||
date_planned date,
|
||||
remuneration_suggested varchar(255),
|
||||
description text,
|
||||
note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
last_main_doc varchar(255),
|
||||
import_key varchar(14),
|
||||
model_pdf varchar(255),
|
||||
status smallint NOT NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_rowid (rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_ref (ref);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_fk_project (fk_project);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_recruiter FOREIGN KEY (fk_user_recruiter) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_supervisor FOREIGN KEY (fk_user_supervisor) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_establishment FOREIGN KEY (fk_establishment) REFERENCES llx_establishment(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_status (status);
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN email_recruiter varchar(255);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN entity INTEGER DEFAULT 1 NOT NULL;
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN remuneration_suggested varchar(255);
|
||||
|
||||
create table llx_recruitment_recruitmentjobposition_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition_extrafields ADD INDEX idx_recruitmentjobposition_fk_object(fk_object);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE llx_recruitment_recruitmentcandidature(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer NOT NULL DEFAULT 1,
|
||||
fk_recruitmentjobposition INTEGER NULL,
|
||||
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
||||
description text,
|
||||
note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
model_pdf varchar(255),
|
||||
status smallint NOT NULL,
|
||||
firstname varchar(128),
|
||||
lastname varchar(128),
|
||||
email varchar(255),
|
||||
phone varchar(64),
|
||||
date_birth date,
|
||||
remuneration_requested integer,
|
||||
remuneration_proposed integer,
|
||||
email_msgid varchar(255),
|
||||
fk_recruitment_origin INTEGER NULL
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN entity integer NOT NULL DEFAULT 1;
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN email_msgid varchar(255);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN fk_recruitment_origin INTEGER NULL;
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN date_birth date;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_rowid (rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_ref (ref);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD CONSTRAINT llx_recruitment_recruitmentcandidature_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_status (status);
|
||||
|
||||
create table llx_recruitment_recruitmentcandidature_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature_extrafields ADD INDEX idx_recruitmentcandidature_fk_object(fk_object);
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid);
|
||||
|
||||
|
||||
ALTER TABLE llx_product_attribute ADD COLUMN ref_ext VARCHAR(255) after ref;
|
||||
ALTER TABLE llx_product_attribute_combination ADD COLUMN variation_ref_ext varchar(255) AFTER variation_weight;
|
||||
|
||||
|
||||
CREATE TABLE llx_product_attribute_combination_price_level
|
||||
(
|
||||
rowid INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
|
||||
fk_product_attribute_combination INTEGER DEFAULT 1 NOT NULL,
|
||||
fk_price_level INTEGER DEFAULT 1 NOT NULL,
|
||||
variation_price DOUBLE(24,8) NOT NULL,
|
||||
variation_price_percentage INTEGER NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_product_attribute_combination_price_level ADD UNIQUE( fk_product_attribute_combination, fk_price_level);
|
||||
|
||||
|
||||
|
||||
-- Add dictionary for prospect level and action commercial on contacts (Using this is not recommanded)
|
||||
|
||||
create table llx_c_prospectcontactlevel
|
||||
(
|
||||
code varchar(12) PRIMARY KEY,
|
||||
label varchar(30),
|
||||
sortorder smallint,
|
||||
active smallint DEFAULT 1 NOT NULL,
|
||||
module varchar(32) NULL
|
||||
) ENGINE=innodb;
|
||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_NONE', 'None', 1);
|
||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_LOW', 'Low', 2);
|
||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_MEDIUM', 'Medium', 3);
|
||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_HIGH', 'High', 4);
|
||||
|
||||
create table llx_c_stcommcontact
|
||||
(
|
||||
id integer PRIMARY KEY,
|
||||
code varchar(12) NOT NULL,
|
||||
libelle varchar(30),
|
||||
picto varchar(128),
|
||||
active tinyint default 1 NOT NULL
|
||||
)ENGINE=innodb;
|
||||
ALTER TABLE llx_c_stcommcontact ADD UNIQUE INDEX uk_c_stcommcontact(code);
|
||||
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values (-1, 'ST_NO', 'Do not contact');
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 0, 'ST_NEVER', 'Never contacted');
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 1, 'ST_TODO', 'To contact');
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 2, 'ST_PEND', 'Contact in progress');
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 3, 'ST_DONE', 'Contacted');
|
||||
|
||||
ALTER TABLE llx_socpeople ADD COLUMN fk_prospectcontactlevel varchar(12) AFTER priv;
|
||||
ALTER TABLE llx_socpeople ADD COLUMN fk_stcommcontact integer DEFAULT 0 NOT NULL AFTER fk_prospectcontactlevel;
|
||||
|
||||
create table llx_c_recruitment_origin
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
code varchar(32) NOT NULL,
|
||||
label varchar(64) NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid);
|
||||
|
||||
|
||||
ALTER TABLE llx_product MODIFY COLUMN seuil_stock_alerte float;
|
||||
ALTER TABLE llx_product MODIFY COLUMN desiredstock float;
|
||||
|
||||
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN seuil_stock_alerte float;
|
||||
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN desiredstock float;
|
||||
|
||||
ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL;
|
||||
|
||||
ALTER TABLE llx_projet ADD COLUMN email_msgid varchar(255);
|
||||
ALTER TABLE llx_ticket ADD COLUMN email_msgid varchar(255);
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN reply_to varchar(255);
|
||||
|
||||
ALTER TABLE llx_paiement ADD pos_change DOUBLE(24,8) DEFAULT 0 AFTER fk_export_compta;
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52);
|
||||
|
||||
ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
ALTER TABLE llx_ecm_directories CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
ALTER TABLE llx_ecm_files CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
|
||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswer)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||
|
||||
ALTER TABLE llx_c_action_trigger MODIFY COLUMN code varchar(64) NOT NULL;
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516);
|
||||
|
||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN entity integer NOT NULL DEFAULT 1;
|
||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_actioncomm integer NOT NULL;
|
||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_email_template integer;
|
||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN lasterror varchar(128) NULL;
|
||||
|
||||
ALTER TABLE llx_actioncomm_reminder DROP INDEX uk_actioncomm_reminder_unique;
|
||||
ALTER TABLE llx_actioncomm_reminder ADD UNIQUE uk_actioncomm_reminder_unique (fk_user, typeremind, offsetvalue, offsetunit, fk_actioncomm);
|
||||
|
||||
ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_status (status);
|
||||
|
||||
|
||||
ALTER TABLE llx_inventorydet ADD UNIQUE uk_inventorydet(fk_inventory, fk_warehouse, fk_product, batch);
|
||||
|
||||
ALTER TABLE llx_commandedet ADD COLUMN ref_ext varchar(255) AFTER label;
|
||||
ALTER TABLE llx_facturedet ADD COLUMN ref_ext varchar(255) AFTER multicurrency_total_ttc;
|
||||
|
||||
ALTER TABLE llx_c_ticket_category ADD COLUMN fk_parent integer DEFAULT 0 NOT NULL;
|
||||
ALTER TABLE llx_c_ticket_category ADD COLUMN force_severity varchar(32) NULL;
|
||||
|
||||
ALTER TABLE llx_c_ticket_severity CHANGE color color VARCHAR(10) NULL;
|
||||
|
||||
ALTER TABLE llx_expensereport ADD COLUMN fk_user_creat integer NULL;
|
||||
|
||||
ALTER TABLE llx_expensereport_ik ADD COLUMN ikoffset double DEFAULT 0 NOT NULL;
|
||||
|
||||
ALTER TABLE llx_paiement ADD COLUMN ref_ext varchar(255) AFTER ref;
|
||||
|
||||
ALTER TABLE llx_bank ADD COLUMN origin_id integer;
|
||||
ALTER TABLE llx_bank ADD COLUMN origin_type varchar(64) NULL;
|
||||
ALTER TABLE llx_bank ADD COLUMN import_key varchar(14);
|
||||
|
||||
ALTER TABLE llx_menu MODIFY COLUMN enabled text;
|
||||
|
||||
CREATE TABLE llx_ecm_files_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_ecm_files_extrafields ADD INDEX idx_ecm_files_extrafields (fk_object);
|
||||
ALTER TABLE llx_ecm_files ADD COLUMN note_private text AFTER fk_user_m;
|
||||
ALTER TABLE llx_ecm_files ADD COLUMN note_public text AFTER note_private;
|
||||
|
||||
CREATE TABLE llx_ecm_directories_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_ecm_directories_extrafields ADD INDEX idx_ecm_directories_extrafields (fk_object);
|
||||
ALTER TABLE llx_ecm_directories ADD COLUMN note_private text AFTER fk_user_m;
|
||||
ALTER TABLE llx_ecm_directories ADD COLUMN note_public text AFTER note_private;
|
||||
|
||||
ALTER TABLE llx_website_page ADD COLUMN allowed_in_frames integer DEFAULT 0;
|
||||
ALTER TABLE llx_website_page ADD COLUMN object_type varchar(255);
|
||||
ALTER TABLE llx_website_page ADD COLUMN fk_object varchar(255);
|
||||
|
||||
DELETE FROM llx_const WHERE name in ('MAIN_INCLUDE_ZERO_VAT_IN_REPORTS');
|
||||
|
||||
UPDATE llx_projet_task_time SET tms = null WHERE tms = 0;
|
||||
ALTER TABLE llx_projet_task_time MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
|
||||
ALTER TABLE llx_projet_task_time MODIFY COLUMN datec datetime;
|
||||
|
||||
|
||||
DELETE FROM llx_user_rights WHERE fk_id IN (SELECT id FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous');
|
||||
DELETE FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous';
|
||||
UPDATE llx_rights_def set perms = 'readall' WHERE perms = 'read_all' and module = 'holiday';
|
||||
|
||||
CREATE TABLE llx_c_product_nature (
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
code tinyint NOT NULL,
|
||||
label varchar(100),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_product_nature ADD UNIQUE INDEX uk_c_product_nature(code, active);
|
||||
|
||||
INSERT INTO llx_c_product_nature (code, label, active) VALUES (0, 'RowMaterial', 1);
|
||||
INSERT INTO llx_c_product_nature (code, label, active) VALUES (1, 'Finished', 1);
|
||||
|
||||
ALTER TABLE llx_product MODIFY COLUMN finished tinyint DEFAULT NULL;
|
||||
ALTER TABLE llx_product ADD CONSTRAINT fk_product_finished FOREIGN KEY (finished) REFERENCES llx_c_product_nature (code);
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30);
|
||||
ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30);
|
||||
|
||||
=======
|
||||
>>>>>>> a93227ac2f04c80c76b517215d1d422168607fb1
|
||||
-- MIGRATION TO DO AFTER RENAMING AN OBJECT
|
||||
|
||||
-- drop constraint
|
||||
ALTER TABLE llx_livraison DROP FOREIGN KEY fk_livraison_fk_soc;
|
||||
ALTER TABLE llx_livraison DROP FOREIGN KEY fk_livraison_fk_user_author;
|
||||
ALTER TABLE llx_livraison DROP FOREIGN KEY fk_livraison_fk_user_valid;
|
||||
|
||||
-- rename Table
|
||||
ALTER TABLE llx_livraison RENAME TO llx_delivery;
|
||||
ALTER TABLE llx_livraison_extrafields RENAME TO llx_delivery_extrafields;
|
||||
ALTER TABLE llx_livraisondet RENAME TO llx_deliverydet;
|
||||
ALTER TABLE llx_livraisondet_extrafields RENAME TO llx_deliverydet_extrafields;
|
||||
|
||||
-- rename index
|
||||
ALTER TABLE llx_delivery DROP INDEX idx_livraison_uk_ref;
|
||||
ALTER TABLE llx_delivery ADD UNIQUE INDEX idx_delivery_uk_ref (ref, entity);
|
||||
ALTER TABLE llx_delivery DROP INDEX idx_livraison_fk_soc;
|
||||
ALTER TABLE llx_delivery ADD INDEX idx_delivery_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_delivery DROP INDEX idx_livraison_fk_user_author;
|
||||
ALTER TABLE llx_delivery ADD INDEX idx_delivery_fk_user_author (fk_user_author);
|
||||
ALTER TABLE llx_delivery DROP INDEX idx_livraison_fk_user_valid;
|
||||
ALTER TABLE llx_delivery ADD INDEX idx_delivery_fk_user_valid (fk_user_valid);
|
||||
|
||||
-- drop constraint
|
||||
ALTER TABLE llx_delivery DROP FOREIGN KEY fk_livraison_fk_soc;
|
||||
ALTER TABLE llx_delivery DROP FOREIGN KEY fk_livraison_fk_user_author;
|
||||
ALTER TABLE llx_delivery DROP FOREIGN KEY fk_livraison_fk_user_valid;
|
||||
|
||||
-- add constraint
|
||||
ALTER TABLE llx_delivery ADD CONSTRAINT fk_delivery_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
ALTER TABLE llx_delivery ADD CONSTRAINT fk_delivery_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_delivery ADD CONSTRAINT fk_delivery_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||
|
||||
ALTER TABLE llx_deliverydet DROP FOREIGN KEY fk_livraisondet_fk_livraison;
|
||||
ALTER TABLE llx_deliverydet DROP INDEX idx_livraisondet_fk_expedition;
|
||||
ALTER TABLE llx_deliverydet CHANGE COLUMN fk_livraison fk_delivery integer;
|
||||
ALTER TABLE llx_deliverydet ADD INDEX idx_deliverydet_fk_delivery (fk_delivery);
|
||||
ALTER TABLE llx_deliverydet ADD CONSTRAINT fk_deliverydet_fk_delivery FOREIGN KEY (fk_delivery) REFERENCES llx_delivery (rowid);
|
||||
|
||||
UPDATE llx_extrafields SET elementtype = 'delivery' WHERE elementtype = 'livraison';
|
||||
UPDATE llx_extrafields SET elementtype = 'deliverydet' WHERE elementtype = 'livraisondet';
|
||||
|
||||
-- update llx_ecm_files
|
||||
UPDATE llx_ecm_files SET src_object_type = 'delivery' WHERE src_object_type = 'livraison';
|
||||
|
||||
-- update llx_links
|
||||
UPDATE llx_links SET objecttype = 'delivery' WHERE objecttype = 'livraison';
|
||||
|
||||
-- update llx_document_model
|
||||
UPDATE llx_document_model SET type = 'delivery' WHERE type = 'livraison';
|
||||
|
||||
-- update llx_object_lang
|
||||
UPDATE llx_object_lang SET type_object = 'delivery' WHERE type_object = 'livraison';
|
||||
|
||||
-- update llx_c_type_contact
|
||||
UPDATE llx_c_type_contact SET element = 'delivery' WHERE element = 'livraison';
|
||||
|
||||
-- update llx_c_email_template
|
||||
UPDATE llx_c_email_template SET type_template = 'delivery' WHERE type_template = 'livraison';
|
||||
|
||||
-- update llx_element_element
|
||||
UPDATE llx_element_element SET sourcetype = 'delivery' WHERE sourcetype = 'livraison';
|
||||
UPDATE llx_element_element SET targettype = 'delivery' WHERE targettype = 'livraison';
|
||||
|
||||
-- update llx_actioncomm
|
||||
UPDATE llx_actioncomm SET element_type = 'delivery' WHERE element_type = 'livraison';
|
||||
|
||||
-- update llx_const
|
||||
UPDATE llx_const set name = 'DELIVERY_ADDON_NUMBER' WHERE name = 'LIVRAISON_ADDON_NUMBER';
|
||||
UPDATE llx_const set value = 'mod_delivery_jade' WHERE value = 'mod_livraison_jade' AND name = 'DELIVERY_ADDON_NUMBER';
|
||||
UPDATE llx_const set value = 'mod_delivery_saphir' WHERE value = 'mod_livraison_saphir' AND name = 'DELIVERY_ADDON_NUMBER';
|
||||
|
||||
-- update llx_rights_def
|
||||
UPDATE llx_rights_def set perms = 'delivery' WHERE perms = 'livraison' and module = 'expedition';
|
||||
UPDATE llx_rights_def set perms = 'delivery_advance' WHERE perms = 'livraison_advance' and module = 'expedition';
|
||||
|
||||
|
||||
ALTER TABLE llx_commande_fournisseurdet ADD INDEX idx_commande_fournisseurdet_fk_commande (fk_commande);
|
||||
ALTER TABLE llx_commande_fournisseurdet ADD INDEX idx_commande_fournisseurdet_fk_product (fk_product);
|
||||
|
||||
|
||||
CREATE TABLE llx_zapier_hook(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL,
|
||||
url varchar(255),
|
||||
event varchar(255),
|
||||
module varchar(128),
|
||||
action varchar(128),
|
||||
status integer,
|
||||
date_creation datetime NOT NULL,
|
||||
fk_user integer NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
||||
CREATE TABLE llx_session(
|
||||
session_id varchar(50) PRIMARY KEY,
|
||||
session_variable text,
|
||||
last_accessed datetime NOT NULL,
|
||||
fk_user integer NOT NULL,
|
||||
remote_ip varchar(64) NULL,
|
||||
user_agent varchar(128) NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'github', 'Github', 'https://github.com/{socialid}', 'fa-github', 1);
|
||||
|
||||
-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_funnel_of_prospection.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_funnel_of_prospection.php' AND entity = 1);
|
||||
-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_customers_outstanding_bill_reached.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_customers_outstanding_bill_reached.php' AND entity = 1);
|
||||
-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_scheduled_jobs.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_scheduled_jobs.php' AND entity = 1);
|
||||
|
||||
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64);
|
||||
|
||||
ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL;
|
||||
|
||||
|
|
@ -30,6 +30,11 @@
|
|||
|
||||
-- Missing in v13 or lower
|
||||
|
||||
ALTER TABLE llx_supplier_proposal_extrafields ADD INDEX idx_supplier_proposal_extrafields (fk_object);
|
||||
ALTER TABLE llx_supplier_proposaldet_extrafields ADD INDEX idx_supplier_proposaldet_extrafields (fk_object);
|
||||
|
||||
ALTER TABLE llx_asset_extrafields ADD INDEX idx_asset_extrafields (fk_object);
|
||||
|
||||
-- For v14
|
||||
|
||||
ALTER TABLE llx_c_availability ADD COLUMN position integer NOT NULL DEFAULT 0;
|
||||
|
|
@ -56,52 +61,61 @@ ALTER TABLE llx_website ADD COLUMN pageviews_month BIGINT UNSIGNED DEFAULT 0;
|
|||
ALTER TABLE llx_website ADD COLUMN pageviews_total BIGINT UNSIGNED DEFAULT 0;
|
||||
|
||||
|
||||
-- Drop foreign key with bad name or not required
|
||||
ALTER TABLE llx_workstation_workstation DROP FOREIGN KEY llx_workstation_workstation_fk_user_creat;
|
||||
ALTER TABLE llx_propal DROP FOREIGN KEY llx_propal_fk_warehouse;
|
||||
|
||||
|
||||
CREATE TABLE llx_workstation_workstation(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
||||
label varchar(255),
|
||||
type varchar(7),
|
||||
note_public text,
|
||||
entity int DEFAULT 1,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
status smallint NOT NULL,
|
||||
nb_operators_required integer,
|
||||
thm_operator_estimated double,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
status smallint NOT NULL,
|
||||
nb_operators_required integer,
|
||||
thm_operator_estimated double,
|
||||
thm_machine_estimated double
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_rowid (rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_ref (ref);
|
||||
ALTER TABLE llx_workstation_workstation ADD CONSTRAINT llx_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_status (status);
|
||||
|
||||
CREATE TABLE llx_workstation_workstation_resource(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
tms timestamp,
|
||||
fk_resource integer,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
tms timestamp,
|
||||
fk_resource integer,
|
||||
fk_workstation integer
|
||||
) ENGINE=innodb;
|
||||
|
||||
CREATE TABLE llx_workstation_workstation_usergroup(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
tms timestamp,
|
||||
fk_usergroup integer,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
tms timestamp,
|
||||
fk_usergroup integer,
|
||||
fk_workstation integer
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
||||
ALTER TABLE llx_propal ADD COLUMN fk_warehouse integer DEFAULT NULL AFTER fk_shipping_method;
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT llx_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
ALTER TABLE llx_propal ADD INDEX idx_propal_fk_warehouse(fk_warehouse);
|
||||
|
||||
|
||||
ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30);
|
||||
ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30);
|
||||
|
||||
ALTER TABLE llx_propal ADD COLUMN fk_warehouse integer DEFAULT NULL AFTER fk_shipping_method;
|
||||
--ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
ALTER TABLE llx_propal ADD INDEX idx_propal_fk_warehouse(fk_warehouse);
|
||||
|
||||
ALTER TABLE llx_societe DROP INDEX idx_societe_entrepot;
|
||||
ALTER TABLE llx_societe CHANGE fk_entrepot fk_warehouse INTEGER DEFAULT NULL;
|
||||
--ALTER TABLE llx_societe ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse);
|
||||
|
||||
|
|
|
|||
20
htdocs/install/mysql/tables/llx_asset_extrafields.key.sql
Normal file
20
htdocs/install/mysql/tables/llx_asset_extrafields.key.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- ===================================================================
|
||||
-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_asset_extrafields ADD INDEX idx_asset_extrafields (fk_object);
|
||||
|
|
@ -35,4 +35,4 @@ ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_author FOREIGN KEY (fk_u
|
|||
ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_cloture FOREIGN KEY (fk_user_cloture) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT llx_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
--ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ ALTER TABLE llx_societe ADD INDEX idx_societe_prospectlevel(fk_prospectlevel);
|
|||
ALTER TABLE llx_societe ADD INDEX idx_societe_typent(fk_typent);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_forme_juridique(fk_forme_juridique);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_shipping_method(fk_shipping_method);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_entrepot(fk_entrepot);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse);
|
||||
|
||||
-- ALTER TABLE llx_societe ADD FOREIGN KEY fk_prospectlevel llx_c_prospectlevel(code);
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ create table llx_societe
|
|||
logo varchar(255) DEFAULT NULL,
|
||||
logo_squarred varchar(255) DEFAULT NULL,
|
||||
canvas varchar(32) DEFAULT NULL, -- type of canvas if used (null by default)
|
||||
fk_entrepot integer DEFAULT 0, -- if we need a link between third party and warehouse
|
||||
fk_entrepot integer DEFAULT NULL, -- if we need a link between third party and warehouse
|
||||
webservices_url varchar(255), -- supplier webservice url
|
||||
webservices_key varchar(128), -- supplier webservice key
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
-- ===================================================================
|
||||
-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_supplier_proposal_extrafields ADD INDEX idx_supplier_proposal_extrafields (fk_object);
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
-- ===================================================================
|
||||
-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_supplier_proposaldet_extrafields ADD INDEX idx_supplier_proposaldet_extrafields (fk_object);
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
-- BEGIN MODULEBUILDER INDEXES
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_rowid (rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_ref (ref);
|
||||
ALTER TABLE llx_workstation_workstation ADD CONSTRAINT llx_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_status (status);
|
||||
-- END MODULEBUILDER INDEXES
|
||||
|
||||
--ALTER TABLE llx_workstation_workstation ADD UNIQUE INDEX uk_workstation_workstation_fieldxy(fieldx, fieldy);
|
||||
|
||||
--ALTER TABLE llx_workstation_workstation ADD CONSTRAINT llx_workstation_workstation_fk_field FOREIGN KEY (fk_field) REFERENCES llx_workstation_myotherobject(rowid);
|
||||
--ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_field FOREIGN KEY (fk_field) REFERENCES llx_workstation_myotherobject(rowid);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ ThisService=This service
|
|||
ThisProduct=This product
|
||||
DefaultForService=Default for service
|
||||
DefaultForProduct=Default for product
|
||||
ProductForThisThirdparty=Product for this thirdparty
|
||||
ServiceForThisThirdparty=Service for this thirdparty
|
||||
CantSuggest=Can't suggest
|
||||
AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s
|
||||
ConfigAccountingExpert=Configuration of the module accounting (double entry)
|
||||
|
|
|
|||
|
|
@ -670,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte
|
|||
Module55000Name=Poll, Survey or Vote
|
||||
Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...)
|
||||
Module59000Name=Margins
|
||||
Module59000Desc=Module to manage margins
|
||||
Module59000Desc=Module to follow margins
|
||||
Module60000Name=Commissions
|
||||
Module60000Desc=Module to manage commissions
|
||||
Module62000Name=Incoterms
|
||||
|
|
@ -1308,7 +1308,7 @@ YouUseBestDriver=You use driver %s which is the best driver currently available.
|
|||
YouDoNotUseBestDriver=You use driver %s but driver %s is recommended.
|
||||
NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization.
|
||||
SearchOptim=Search optimization
|
||||
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
|
||||
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
|
||||
YouHaveXObjectAndSearchOptimOn=You have %s %s in the database and constant %s is set to 1 in Home-Setup-Other.
|
||||
BrowserIsOK=You are using the %s web browser. This browser is ok for security and performance.
|
||||
BrowserIsKO=You are using the %s web browser. This browser is known to be a bad choice for security, performance and reliability. We recommend using Firefox, Chrome, Opera or Safari.
|
||||
|
|
|
|||
|
|
@ -180,3 +180,4 @@ BankColorizeMovementDesc=If this function is enable, you can choose specific bac
|
|||
BankColorizeMovementName1=Background color for debit movement
|
||||
BankColorizeMovementName2=Background color for credit movement
|
||||
IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning.
|
||||
NoBankAccountDefined=No bank account defined
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user