Merge remote-tracking branch 'upstream/develop' into 15a25
This commit is contained in:
commit
0cbfdb4219
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@ -116,13 +116,13 @@ a process to follow to optimize the chance to have PRs merged efficiently...
|
||||
|
||||
Also, some code changes need a prior approbation:
|
||||
|
||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-yoda in your issue) to see if such a library can be accepted.
|
||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
|
||||
|
||||
* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Then ask the project manager (@dolibarr-yoda) if the new data model you plan to add is compatible with curent and future works in progress and can be accepted as you suggest.
|
||||
* if you add a new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
|
||||
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case).
|
||||
|
||||
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of PR (but it can be analyzed for discussion).
|
||||
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of the PR (but it can be analyzed for discussion).
|
||||
|
||||
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
|
||||
|
||||
|
||||
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,18 +1,18 @@
|
||||
# Instructions
|
||||
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *only keep the "Fix", "Close" or "New" section*
|
||||
- *only keep the "FIX", "CLOSE" or "NEW" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
|
||||
|
||||
# Fix #[*issue_number Short description*]
|
||||
# FIX|Fix #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# Close #[*issue_number Short description*]
|
||||
# CLOSE|Close #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# New [*Short description*]
|
||||
# NEW|New [*Short description*]
|
||||
[*Long description*]
|
||||
|
||||
200
ChangeLog
200
ChangeLog
@ -5,18 +5,185 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 15.0.0 compared to 14.0.0 *****
|
||||
|
||||
For users:
|
||||
---------------
|
||||
|
||||
NEW: Online proposal signature
|
||||
NEW: Can define some max limit on expense report (per period, per type or expense, ...)
|
||||
NEW: Allow the use of __NEWREF__ to get for example the new reference a draft order will get after validation.
|
||||
NEW: #18326 Workflow: Close order on shipment closing.
|
||||
NEW: #18401 Add __NEWREF__ subtitute to get new object reference.
|
||||
NEW: #18403 Add __URL_SHIPMENT__ substitute to get the URL of a shipment
|
||||
NEW: #18689 REST API module: add api key generate / modify right.
|
||||
NEW: #18663 Make "L'Annuaire des Entreprises" the default provider for SIREN verification for French thirdparties.
|
||||
NEW: #18046 Add tags on ticket/categories
|
||||
NEW: #18326 Workflow: Close order on shipment closing.
|
||||
NEW: #18770 Can enter the buying price (for Weighted Average Price update) on lines during the reception step
|
||||
NEW: #18814 Add legal form for Sweden
|
||||
NEW: #18820 Accountancy - Add product account in import/export of thirdparty (level 3)
|
||||
NEW: Accountancy - Format FEC/FEC2 - Add column NumFacture
|
||||
NEW: Add $dolibarr_main_db_readonly in conf.php for readonly access.
|
||||
NEW: add auto creation of agenda event on supplier_order cancellation
|
||||
NEW: Add a PDF document template for Manufacturing Orders
|
||||
NEW: Add budget field into task #18986
|
||||
NEW: add cancel button to `classify reception` form on supplier_orders
|
||||
NEW: Added address field into contacts list
|
||||
NEW: Added documents page and send mail possibility in payments
|
||||
NEW: Add edit option in propal
|
||||
NEW: Added linked files page and send mail possibility in payments
|
||||
NEW: Add field date from/to in customer and supplier payment list
|
||||
NEW: Add filter from date to date into action/evt list
|
||||
NEW: Add import / export of MO and BOMLines - Close #18499
|
||||
NEW: Adding accounting export model for iSuite Expert
|
||||
NEW: add link to an element by ref
|
||||
NEW: add missing printFieldListFrom hook call on several lists
|
||||
NEW: add MRP into Object Linked Box
|
||||
NEW: Add option to hide customer code on PDF documents
|
||||
NEW: Add param $nolog to avoid logging into dol_delete_recursive_dir()
|
||||
NEW: Add sale representative in order and invoice list
|
||||
NEW: add a setting to create PDF in PDF/A - 1b format #18990
|
||||
NEW: Add `SOCIETE_SHOW_VAT_IN_LIST` to display VAT number in combo list of thirdparties
|
||||
NEW: Add sortorder on units list
|
||||
NEW: Adds PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES to hide product label in supplier order lines
|
||||
NEW: Add STOCK_MOVEMENT_LIST_HIDE_UNIT_PRICE to hide unit price on some pages
|
||||
NEW: add support for zstd compression
|
||||
NEW: Allow drag and drop on kits
|
||||
NEW: Allow exporting supplier order validation date + validation user
|
||||
NEW: Allows product ref generation after the form is validated with PRODUCT_GENERATE_REF_AFTER_FORM
|
||||
NEW: autocomplete account group when editing an account card
|
||||
NEW: Auto create invoice for payment done on an order with online payment link of order
|
||||
NEW: Can edit fields of proposal when proposal is not yet signed
|
||||
NEW: Can edit the translation key of an overwrote translation key.
|
||||
NEW: can enable/disable external calendar by default
|
||||
NEW: Can hide sender name on PDF documents
|
||||
NEW: Can select lot from a combo list of existing batch numbers (in MRP consumtion)
|
||||
NEW: Can set the default BOM on a product
|
||||
NEW: Can set/unset the usual working day of the week (friday, saturday, sunday)
|
||||
NEW: Can show progression of task into combo list of tasks
|
||||
NEW: can upload the odt file for the product doc template
|
||||
NEW: Contract - Add From/to input on search date
|
||||
NEW: Customer Display with TakePOS
|
||||
NEW: Split Sale in TakePOS
|
||||
NEW: Customer invoice template list - Add input date from/to
|
||||
NEW: date filter on project list and task list From->To
|
||||
NEW: display shipping method and tracking url on shipment list
|
||||
NEW: expense reports: conf to force amounts to be entered only including taxes
|
||||
NEW: expense reports: conf to pre-fill start/end dates with bounds of current month
|
||||
NEW: expense reports: show link to already existing overlapping expense report
|
||||
NEW: expense reports: can make project field mandatory on lines
|
||||
NEW: Expose bank account holder, label and number
|
||||
NEW: feature #18986
|
||||
NEW: field and behavior in product object
|
||||
NEW: generate intervention from time spent
|
||||
NEW: holiday: handle monthly balance updates with cronjob
|
||||
NEW: HRM integration, source code
|
||||
NEW: HRM admin - Add tabs
|
||||
NEW: HRM - Include more options to manage/custom dashboard
|
||||
NEW: Increase size of params of actions for emailcollector
|
||||
NEW: Invoice list - Use complete country select field with EEC or not
|
||||
NEW: mass action delete, no more break if at least one object has child
|
||||
NEW: mass action paid on customer invoice list
|
||||
NEW: massaction validate on supplier orders list
|
||||
NEW: Mass action send email to all attendees of an event.
|
||||
NEW: expense reports: conf to pre-fill start/end dates with bounds of current month
|
||||
NEW: Option "Add a link on the PDF to make the online payment"
|
||||
NEW: More options to generate PDF (show Frame option, width of picture option)
|
||||
NEW: Preview of pdf files of expense report lines
|
||||
NEW: print without details
|
||||
NEW: project time spent: conf to prevent recording time after X months
|
||||
NEW: rewrite bind accountancy code finding on customer and sales invoice
|
||||
NEW: Societe - Add perentity functionality on customer/supplier accountancy auxiliary account
|
||||
NEW: Survey - Add a clickable link in email send
|
||||
NEW: Social Contributions - Add from/to filter on list
|
||||
NEW: Supplier order and proposal - Add From/to input on search date
|
||||
NEW: Task - Add From/to input on search date
|
||||
NEW: Add theme option THEME_ELDY_USEBORDERONTABLE
|
||||
NEW: The Anti-CSRF protection MAIN_SECURITY_CSRF_WITH_TOKEN is on to value 1 by default
|
||||
NEW: Update SQL : install and migration
|
||||
NEW: Use an ajax call for the clicktodial feature instead of href link.
|
||||
NEW: when multiple order linked to facture, show list into note.
|
||||
NEW: when we delete several objects with massaction, if somes object has child we must see which objects are concerned and nevertheless delete objects which can be deleted
|
||||
NEW: Editing a page in website module keep old page with name .back
|
||||
|
||||
|
||||
For developers:
|
||||
---------------
|
||||
|
||||
WARNING:
|
||||
NEW: Introduce method hasRight
|
||||
NEW: Can use textarea field into a confirm popup.
|
||||
NEW: Can use the result_mode of mysqli driver. Save memory for list count
|
||||
NEW: #18319 REST API - Shipment: Add 'close' action / endpoint / POST method.
|
||||
NEW: add action trigger for member excluded
|
||||
NEW: add option MAIN_IBAN_IS_NEVER_MANDATORY, MAIN_IBAN_NOT_MANDATORY, PROPAL_NOT_BILLABLE, PROPAL_REOPEN_UNSIGNED_ONLY, PROPOSAL_ARE_NOT_BILLABLE, TICKETS_MESSAGE_FORCE_MAIL
|
||||
NEW: Add code codebar column on serial/lot structure
|
||||
NEW: Add date_valid and date_approve columns in the list of supplier orders
|
||||
NEW: add hook `beforeBodyClose`
|
||||
NEW: Add hook hookGetEntity.
|
||||
NEW: add hookmanager on note pages
|
||||
NEW: add hook 'menuLeftMenuItems' to filter the leftmenu items
|
||||
NEW: Add the property "copytoclipboard" in modulebuilder
|
||||
NEW: api for knowledgemanagement
|
||||
NEW: API get list of legal form of business
|
||||
NEW: API list of staff units
|
||||
NEW: hook after rank update
|
||||
NEW: printFieldListFrom hook call on several lists
|
||||
NEW: Use lang selector when using a field key 'lang' in modulebuilder
|
||||
NEW: we need to be able to put more filters on deleteByParentField() function
|
||||
NEW: make it easier to set the `keyword`, `keywords` and `description` attributes of an ecm file object
|
||||
|
||||
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Update hook 'printOriginObjectLine', removed check on product type and special code. Need now reshook.
|
||||
* Old deprecated module "SimplePOS" has been completely removed. Use module "TakePOS" is you need a Point Of Sale.
|
||||
* The method static ActionComm::getActions($db, ...) is no more static. Use $actioncomm->getActions(...) instead (without $db param).
|
||||
* The 'action=delete&file=...' has been replaced with 'action=deletefile&file=...' to avoid confusion with deletion of object lines.
|
||||
* Method getDictvalue has been renamed into getDictionaryValue to match camel case rule.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 14.0.3 compared to 14.0.2 *****
|
||||
|
||||
FIX: #18698 Supplier invoice list - "alert" checkbox not working
|
||||
FIX: #18735
|
||||
FIX: #18767 : Member delete
|
||||
FIX: #18854
|
||||
FIX: #18910 : MRP List SQL query syntax error with more than one extrafileds.
|
||||
FIX: Accountancy - Format Quadra export - Missing line type C to create automaticly a subledger account with label
|
||||
FIX: Accountancy - Missing specific filename for export on format FEC2, Ciel & repare it
|
||||
FIX: Accountancy - Option of export popup are inverted
|
||||
FIX: Accountancy - Some correction on export name
|
||||
FIX: Accountancy - Trunc code_journal to 2 in format XIMPORT (Ciel, Sage50)
|
||||
FIX: add warehouse in projects' overview count
|
||||
FIX: autocalculation of the supplier price in main currency.
|
||||
FIX: avoid warning if $categories is an id
|
||||
FIX: Bad use of a forced contact of another company on PDF/ODT documents
|
||||
FIX: Button text on proposal card to create a invoice
|
||||
FIX: calculateCosts of BOM must not be included into fetch
|
||||
FIX: check if greater 0
|
||||
FIX: default language defined for IN country
|
||||
FIX: fetch of product with modulebuilder load too much data
|
||||
FIX: Filter on categories
|
||||
FIX: indentation
|
||||
FIX: init hookmanager after loading $conf values
|
||||
FIX: legal issue on expense report pdf (must also show price without tax)
|
||||
FIX: missing filter status=1 on rss feeds
|
||||
FIX: move fetch_optionnal into $ac_static->fetch()
|
||||
FIX: payment using wrong type in takepos when too many payment mode
|
||||
FIX: Product accountancy affectation with product_perentity activated (PR #18620)
|
||||
FIX: products/services card: hidden extrafields were overridden
|
||||
FIX: Propal list - Problem of pagination on date
|
||||
FIX: selected lines on supplier invoice create
|
||||
FIX: Selection of type "people" for membership must hide the company
|
||||
FIX: select list of orders not complete when field type of company is on
|
||||
FIX: support of localtax on expense report
|
||||
FIX: task time: can't filter by user with pgsql + show error message
|
||||
FIX: task time: keep on using natural_search
|
||||
FIX: Test when date of invoie is in future (pb with TZ and offset)
|
||||
FIX: translation into email for member at membership validation.
|
||||
FIX: unprivileged user can see task associated with a not allowed project
|
||||
FIX: user without permission can set ticket subject
|
||||
|
||||
***** ChangeLog for 14.0.2 compared to 14.0.1 *****
|
||||
|
||||
FIX: #18353 Invoice list translation issue
|
||||
@ -331,6 +498,37 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.5 compared to 13.0.4 *****
|
||||
|
||||
FIX: 13.0: class CommandeFournisseurDispatch provides trigger for UPDATE but not for CREATE / DELETE
|
||||
FIX: #18389 Accountancy - Bug on LDcompta10 export for supplier invoice
|
||||
FIX: #18591 : Remove double quotes of SQL Queries for postgresql compatibility
|
||||
FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT)
|
||||
FIX: Accountancy - Some problems of length with general & subledger account
|
||||
FIX: add DISTINCT
|
||||
FIX: an approved holiday can be canceled by an admin.
|
||||
FIX: autocalculation of the supplier price in main currency.
|
||||
FIX: better sql request
|
||||
FIX: cannot add time spend when column ref is not displayed
|
||||
FIX: compatibility postgre sql
|
||||
FIX: holiday card: hooks uninitialized
|
||||
FIX: Invoice - Missing button to reopen an abandoned situation invoice
|
||||
FIX: invoice validation: when checking if any VAT rate has a negative amount, prevent false positives with -1.0E-14 amounts
|
||||
FIX: list of categories in stats of supplier invoices
|
||||
FIX: Manage credit note on situation invoice for calculate margin
|
||||
FIX: method_exists needs object at first param
|
||||
FIX: move fetch_optionnal into $ac_static->fetch()
|
||||
FIX: multicompany transverse mode compatibility
|
||||
FIX: on supplier order, JOIN with product fourn price table must be done with fk_soc too to avoid display several times a same line (because of same supplier product ref)
|
||||
FIX: postgre filter select search extrafield
|
||||
FIX: products/services card: hidden extrafields were overridden
|
||||
FIX: shipping validation workflow: 'ORDER_NEW' trigger called from wrong object
|
||||
FIX: task time: can't filter by user with pgsql + show error message
|
||||
FIX: task time: keep on using natural_search
|
||||
FIX: wrong users count in multicompany transverse mode
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.4 compared to 13.0.3 *****
|
||||
|
||||
FIX: Allow disabling of a module (not a dangerous action) even if there is problem with token (due to bugged modules).
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
"nnnick/chartjs" : "^2.9",
|
||||
"stripe/stripe-php" : "6.43.1",
|
||||
"maximebf/debugbar" : "1.15.1",
|
||||
"symfony/var-dumper" : "3"
|
||||
"symfony/var-dumper" : "3.2"
|
||||
},
|
||||
"require-dev" : {
|
||||
"php-parallel-lint/php-parallel-lint" : "^0",
|
||||
|
||||
4
composer.lock
generated
4
composer.lock
generated
@ -591,7 +591,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v3.0.0",
|
||||
"version": "v3.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
@ -616,7 +616,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
"dev-master": "3.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
||||
@ -188,7 +188,10 @@ with:
|
||||
with
|
||||
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) {
|
||||
|
||||
|
||||
* Fix php fatal error on php 8.0 on tcpdi.php
|
||||
while (list($k, $v) = each($value[1])) {
|
||||
with
|
||||
foreach ($value[1] as $k => $v) {
|
||||
|
||||
JSGANTT:
|
||||
--------
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2011-2021 Alexandre Spangaro <aspangaro@open-dsi.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
|
||||
@ -91,19 +91,19 @@ $tabsql[32] = "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account
|
||||
$tabsqlsort = array();
|
||||
$tabsqlsort[32] = "position ASC";
|
||||
|
||||
// Nom des champs en resultat de select pour affichage du dictionnaire
|
||||
// Name of the fields in the result of select to display the dictionary
|
||||
$tabfield = array();
|
||||
$tabfield[32] = "code,label,range_account,category_type,formula,position,country";
|
||||
|
||||
// Nom des champs d'edition pour modification d'un enregistrement
|
||||
// Name of editing fields for record modification
|
||||
$tabfieldvalue = array();
|
||||
$tabfieldvalue[32] = "code,label,range_account,category_type,formula,position,country_id";
|
||||
|
||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
||||
// Name of the fields in the table for inserting a record
|
||||
$tabfieldinsert = array();
|
||||
$tabfieldinsert[32] = "code,label,range_account,category_type,formula,position,fk_country";
|
||||
|
||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
||||
// Name of the rowid if the field is not of type autoincrement
|
||||
// Example: "" if id field is "rowid" and has autoincrement on
|
||||
// "nameoffield" if id field is not "rowid" or has not autoincrement on
|
||||
$tabrowid = array();
|
||||
@ -151,7 +151,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
if ($value == 'range_account' && empty($_POST['range_account'])) {
|
||||
continue;
|
||||
}
|
||||
if ($value == 'country' || $value == 'country_id') {
|
||||
if (($value == 'country' || $value == 'country_id') && (!empty($_POST['country_id']))) {
|
||||
continue;
|
||||
}
|
||||
if (!GETPOSTISSET($value) || GETPOST($value) == '') {
|
||||
@ -176,6 +176,9 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
if ($fieldnamekey == 'category_type') {
|
||||
$fieldnamekey = 'Calculated';
|
||||
}
|
||||
if ($fieldnamekey == 'country') {
|
||||
$fieldnamekey = 'Country';
|
||||
}
|
||||
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
||||
}
|
||||
@ -263,7 +266,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
}
|
||||
}
|
||||
|
||||
// Si verif ok et action modify, on modifie la ligne
|
||||
// If check ok and action modify, we modify the line
|
||||
if ($ok && GETPOST('actionmodify', 'alpha')) {
|
||||
if ($tabrowid[$id]) {
|
||||
$rowidcol = $tabrowid[$id];
|
||||
@ -430,12 +433,12 @@ print load_fiche_titre($titre, $linkback, $titlepicto);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("AccountingAccountGroupsDesc", $langs->transnoentitiesnoconv("ByPersonalizedAccountGroups")).'</span><br><br>';
|
||||
|
||||
// Confirmation de la suppression de la ligne
|
||||
// Confirmation of the deletion of the line
|
||||
if ($action == 'delete') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id.($search_country_id > 0 ? '&search_country_id='.$search_country_id : ''), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
|
||||
// Complete requete recherche valeurs avec critere de tri
|
||||
// Complete search query with sorting criteria
|
||||
$sql = $tabsql[$id];
|
||||
|
||||
if ($search_country_id > 0) {
|
||||
@ -634,14 +637,14 @@ if ($resql) {
|
||||
// Title of lines
|
||||
print '<tr class="liste_titre">';
|
||||
foreach ($fieldlist as $field => $value) {
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
$showfield = 1; // By defaut
|
||||
// Determines the name of the field in relation to the possible names
|
||||
// in data dictionaries
|
||||
$showfield = 1; // By default
|
||||
$class = "left";
|
||||
$sortable = 1;
|
||||
$valuetoshow = '';
|
||||
|
||||
$valuetoshow = ucfirst($fieldlist[$field]); // By defaut
|
||||
$valuetoshow = ucfirst($fieldlist[$field]); // By default
|
||||
$valuetoshow = $langs->trans($valuetoshow); // try to translate
|
||||
if ($fieldlist[$field] == 'source') {
|
||||
$valuetoshow = $langs->trans("Contact");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -260,6 +260,22 @@ $linkback = '';
|
||||
//$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($title, $linkback, 'accountancy');
|
||||
|
||||
// Show message if accountancy hidden options are activated to help to resolve some problems
|
||||
if (!$user->admin) {
|
||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>';
|
||||
}
|
||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||
print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>';
|
||||
}
|
||||
if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
|
||||
print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '</div>';
|
||||
}
|
||||
if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
|
||||
print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED") . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
@ -914,7 +914,8 @@ class AccountancyExport
|
||||
print "ValidDate".$separator;
|
||||
print "Montantdevise".$separator;
|
||||
print "Idevise".$separator;
|
||||
print "DateLimitReglmt";
|
||||
print "DateLimitReglmt".$separator;
|
||||
print "NumFacture".$separator;
|
||||
print $end_line;
|
||||
|
||||
foreach ($objectLines as $line) {
|
||||
@ -927,6 +928,22 @@ class AccountancyExport
|
||||
$date_validation = dol_print_date($line->date_validation, '%Y%m%d');
|
||||
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
// Customer invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$invoice = new Facture($db);
|
||||
$invoice->fetch($line->fk_doc);
|
||||
|
||||
$refInvoice = $invoice->ref;
|
||||
} elseif ($line->doc_type == 'supplier_invoice') {
|
||||
// Supplier invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$invoice = new FactureFournisseur($db);
|
||||
$invoice->fetch($line->fk_doc);
|
||||
|
||||
$refInvoice = $invoice->ref_supplier;
|
||||
}
|
||||
|
||||
// FEC:JournalCode
|
||||
print $line->code_journal . $separator;
|
||||
|
||||
@ -984,6 +1001,9 @@ class AccountancyExport
|
||||
// FEC_suppl:DateLimitReglmt
|
||||
print $date_limit_payment;
|
||||
|
||||
// FEC_suppl:NumFacture
|
||||
print dol_trunc(self::toAnsi($refInvoice), 17, 'right', 'UTF-8', 1) . $separator;
|
||||
|
||||
print $end_line;
|
||||
}
|
||||
}
|
||||
@ -1020,7 +1040,8 @@ class AccountancyExport
|
||||
print "ValidDate".$separator;
|
||||
print "Montantdevise".$separator;
|
||||
print "Idevise".$separator;
|
||||
print "DateLimitReglmt";
|
||||
print "DateLimitReglmt".$separator;
|
||||
print "NumFacture".$separator;
|
||||
print $end_line;
|
||||
|
||||
foreach ($objectLines as $line) {
|
||||
@ -1033,6 +1054,22 @@ class AccountancyExport
|
||||
$date_validation = dol_print_date($line->date_validation, '%Y%m%d');
|
||||
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
// Customer invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$invoice = new Facture($db);
|
||||
$invoice->fetch($line->fk_doc);
|
||||
|
||||
$refInvoice = $invoice->ref;
|
||||
} elseif ($line->doc_type == 'supplier_invoice') {
|
||||
// Supplier invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$invoice = new FactureFournisseur($db);
|
||||
$invoice->fetch($line->fk_doc);
|
||||
|
||||
$refInvoice = $invoice->ref_supplier;
|
||||
}
|
||||
|
||||
// FEC:JournalCode
|
||||
print $line->code_journal . $separator;
|
||||
|
||||
@ -1090,6 +1127,10 @@ class AccountancyExport
|
||||
// FEC_suppl:DateLimitReglmt
|
||||
print $date_limit_payment;
|
||||
|
||||
// FEC_suppl:NumFacture
|
||||
print dol_trunc(self::toAnsi($refInvoice), 17, 'right', 'UTF-8', 1) . $separator;
|
||||
|
||||
|
||||
print $end_line;
|
||||
}
|
||||
}
|
||||
|
||||
@ -937,7 +937,6 @@ class BookKeeping extends CommonObject
|
||||
$line->piece_num = $obj->piece_num;
|
||||
$line->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$line->date_export = $this->db->jdate($obj->date_export);
|
||||
$line->date_validation = $this->db->jdate($obj->date_validated);
|
||||
$line->date_validation = $this->db->jdate($obj->date_validation);
|
||||
|
||||
$this->lines[] = $line;
|
||||
@ -1090,7 +1089,6 @@ class BookKeeping extends CommonObject
|
||||
$line->date_lim_reglement = $this->db->jdate($obj->date_lim_reglement);
|
||||
$line->date_modification = $this->db->jdate($obj->date_modification);
|
||||
$line->date_export = $this->db->jdate($obj->date_export);
|
||||
$line->date_validation = $this->db->jdate($obj->date_validated);
|
||||
$line->date_validation = $this->db->jdate($obj->date_validation);
|
||||
|
||||
$this->lines[] = $line;
|
||||
@ -1752,7 +1750,6 @@ class BookKeeping extends CommonObject
|
||||
$line->date_creation = $obj->date_creation;
|
||||
$line->date_modification = $obj->date_modification;
|
||||
$line->date_export = $obj->date_export;
|
||||
$line->date_validation = $obj->date_validated;
|
||||
$line->date_validation = $obj->date_validation;
|
||||
|
||||
$this->linesmvt[] = $line;
|
||||
@ -1817,7 +1814,6 @@ class BookKeeping extends CommonObject
|
||||
$line->sens = $obj->sens;
|
||||
$line->code_journal = $obj->code_journal;
|
||||
$line->piece_num = $obj->piece_num;
|
||||
$line->date_validation = $obj->date_validated;
|
||||
$line->date_validation = $obj->date_validation;
|
||||
|
||||
$this->linesexport[] = $line;
|
||||
|
||||
@ -225,7 +225,7 @@ if ($action == 'validatehistory') {
|
||||
$facture_static->ref = $objp->ref;
|
||||
$facture_static->id = $objp->facid;
|
||||
$facture_static->type = $objp->ftype;
|
||||
$facture_static->datef = $objp->datef;
|
||||
$facture_static->date = $objp->datef;
|
||||
|
||||
$facture_static_det->id = $objp->rowid;
|
||||
$facture_static_det->total_ht = $objp->total_ht;
|
||||
|
||||
@ -558,7 +558,7 @@ if ($result) {
|
||||
$facture_static->ref = $objp->ref;
|
||||
$facture_static->id = $objp->facid;
|
||||
$facture_static->type = $objp->ftype;
|
||||
$facture_static->datef = $objp->datef;
|
||||
$facture_static->date = $objp->datef;
|
||||
|
||||
$facture_static_det->id = $objp->rowid;
|
||||
$facture_static_det->total_ht = $objp->total_ht;
|
||||
|
||||
@ -228,7 +228,7 @@ print "</td></tr>\n";
|
||||
// Allow members to change type on renewal forms
|
||||
/* To test during next beta
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MemberAllowchangeOfType").'</td><td>';
|
||||
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1);
|
||||
print $form->selectyesno('MEMBER_ALLOW_CHANGE_OF_TYPE', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1);
|
||||
print "</td></tr>\n";
|
||||
*/
|
||||
|
||||
|
||||
@ -928,7 +928,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
$object->state_id = GETPOST('state_id', 'int');
|
||||
|
||||
// We set country_id, country_code and country for the selected country
|
||||
$object->country_id = GETPOST('country_id', 'int') ?GETPOST('country_id', 'int') : $mysoc->country_id;
|
||||
$object->country_id = GETPOST('country_id', 'int') ? GETPOST('country_id', 'int') : $mysoc->country_id;
|
||||
if ($object->country_id) {
|
||||
$tmparray = getCountry($object->country_id, 'all');
|
||||
$object->country_code = $tmparray['code'];
|
||||
@ -936,12 +936,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
}
|
||||
|
||||
if (!empty($socid)) {
|
||||
$object = new Societe($db);
|
||||
$soc = new Societe($db);
|
||||
if ($socid > 0) {
|
||||
$object->fetch($socid);
|
||||
$soc->fetch($socid);
|
||||
}
|
||||
|
||||
if (!($object->id > 0)) {
|
||||
if (!($soc->id > 0)) {
|
||||
$langs->load("errors");
|
||||
print($langs->trans('ErrorRecordNotFound'));
|
||||
exit;
|
||||
@ -1024,7 +1024,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print "</td>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $object->company).'"></td></tr>';
|
||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $soc->name).'"></td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||
@ -1048,7 +1048,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
// EMail
|
||||
print '<tr><td>'.(!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? '<span class="fieldrequired">' : '').$langs->trans("EMail").(!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? '</span>' : '').'</td>';
|
||||
print '<td>'.img_picto('', 'object_email').' <input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
|
||||
print '<td>'.img_picto('', 'object_email').' <input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $soc->email).'"></td></tr>';
|
||||
|
||||
// Website
|
||||
print '<tr><td>'.$form->editfieldkey('Web', 'member_url', '', $object, 0).'</td>';
|
||||
@ -1056,21 +1056,25 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
// Address
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
|
||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOSTISSET('address') ?GETPOST('address', 'alphanohtml') : $object->address).'</textarea>';
|
||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOSTISSET('address') ?GETPOST('address', 'alphanohtml') : $soc->address).'</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||
print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||
print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $soc->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||
print ' ';
|
||||
print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||
print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $soc->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
$object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id;
|
||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
|
||||
if (empty($soc->country_id)) {
|
||||
$soc->country_id = $mysoc->country_id;
|
||||
$soc->country_code = $mysoc->country_code;
|
||||
$soc->state_id = $mysoc->state_id;
|
||||
}
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td>';
|
||||
print img_picto('', 'country', 'class="pictofixedwidth"');
|
||||
print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
|
||||
print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $soc->country_id, 'country_id');
|
||||
if ($user->admin) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}
|
||||
@ -1079,9 +1083,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
// State
|
||||
if (empty($conf->global->MEMBER_DISABLE_STATE)) {
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||
if ($object->country_id) {
|
||||
if ($soc->country_id) {
|
||||
print img_picto('', 'state', 'class="pictofixedwidth"');
|
||||
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
|
||||
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $soc->state_id, $soc->country_code);
|
||||
} else {
|
||||
print $countrynotdefined;
|
||||
}
|
||||
@ -1090,7 +1094,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
// Pro phone
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
||||
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td></tr>';
|
||||
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $soc->phone).'"></td></tr>';
|
||||
|
||||
// Personal phone
|
||||
print '<tr><td>'.$langs->trans("PhonePerso").'</td>';
|
||||
@ -2012,7 +2016,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
// Generated documents
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
//$filename = 'tmp_cards.php';
|
||||
$filedir = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member');
|
||||
$urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id;
|
||||
$genallowed = $user->rights->adherent->lire;
|
||||
@ -2046,14 +2049,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
$MAX = 10;
|
||||
|
||||
$morehtmlright = '<a href="'.DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id.'">';
|
||||
$morehtmlright .= $langs->trans("SeeAll");
|
||||
$morehtmlright .= '</a>';
|
||||
$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id);
|
||||
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1, 'listactions', $MAX, '', $morehtmlright);
|
||||
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1, 'listactions', $MAX, '', $morehtmlcenter);
|
||||
|
||||
print '</div></div></div>';
|
||||
}
|
||||
|
||||
@ -39,6 +39,7 @@ $day = dol_print_date($now, '%d');
|
||||
$foruserid = GETPOST('foruserid', 'alphanohtml');
|
||||
$foruserlogin = GETPOST('foruserlogin', 'alphanohtml');
|
||||
$mode = GETPOST('mode', 'aZ09');
|
||||
$modelcard = GETPOST("modelcard", 'aZ09'); // Doc template to use for business cards
|
||||
$model = GETPOST("model", 'aZ09'); // Doc template to use for business cards
|
||||
$modellabel = GETPOST("modellabel", 'aZ09'); // Doc template to use for address sheet
|
||||
$mesg = '';
|
||||
@ -84,10 +85,10 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) {
|
||||
$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1";
|
||||
$sql .= " AND d.entity IN (".getEntity('adherent').")";
|
||||
if (is_numeric($foruserid)) {
|
||||
$sql .= " AND d.rowid=".(int) $foruserid;
|
||||
$sql .= " AND d.rowid = ".(int) $foruserid;
|
||||
}
|
||||
if ($foruserlogin) {
|
||||
$sql .= " AND d.login='".$db->escape($foruserlogin)."'";
|
||||
$sql .= " AND d.login = '".$db->escape($foruserlogin)."'";
|
||||
}
|
||||
$sql .= " ORDER BY d.rowid ASC";
|
||||
|
||||
@ -143,7 +144,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) {
|
||||
'__MONTH__'=>$month,
|
||||
'__DAY__'=>$day,
|
||||
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
|
||||
'__SERVER__'=>"http://".$_SERVER["SERVER_NAME"]."/"
|
||||
'__SERVER__'=>"https://".$_SERVER["SERVER_NAME"]."/"
|
||||
);
|
||||
complete_substitutions_array($substitutionarray, $langs, $adherentstatic);
|
||||
|
||||
@ -155,7 +156,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) {
|
||||
$textright = make_substitutions($conf->global->ADHERENT_CARD_TEXT_RIGHT, $substitutionarray);
|
||||
|
||||
if (is_numeric($foruserid) || $foruserlogin) {
|
||||
$nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY'];
|
||||
$nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY']; // $_Avery_Labels is defined into an include
|
||||
if ($nb <= 0) {
|
||||
$nb = 1; // Protection to avoid empty page
|
||||
}
|
||||
@ -209,7 +210,19 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) {
|
||||
}
|
||||
|
||||
// Build and output PDF
|
||||
if (empty($mode) || $mode == 'card' || $mode == 'cardlogin') {
|
||||
$outputlangs = $langs;
|
||||
|
||||
if (empty($mode) || $mode == 'card') {
|
||||
if (!count($arrayofmembers)) {
|
||||
$mesg = $langs->trans("ErrorRecordNotFound");
|
||||
}
|
||||
if (empty($modelcard) || $modelcard == '-1') {
|
||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_CARD_TYPE"));
|
||||
}
|
||||
if (!$mesg) {
|
||||
$result = members_card_pdf_create($db, $arrayofmembers, $modelcard, $outputlangs, '', 'standard', 'tmp_cards');
|
||||
}
|
||||
} elseif ($mode == 'cardlogin') {
|
||||
if (!count($arrayofmembers)) {
|
||||
$mesg = $langs->trans("ErrorRecordNotFound");
|
||||
}
|
||||
@ -217,7 +230,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) {
|
||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_CARD_TYPE"));
|
||||
}
|
||||
if (!$mesg) {
|
||||
$result = members_card_pdf_create($db, $arrayofmembers, $model, $outputlangs);
|
||||
$result = members_card_pdf_create($db, $arrayofmembers, $model, $outputlangs, '', 'standard', 'tmp_cards_login');
|
||||
}
|
||||
} elseif ($mode == 'label') {
|
||||
if (!count($arrayofmembers)) {
|
||||
@ -275,7 +288,7 @@ foreach (array_keys($_Avery_Labels) as $codecards) {
|
||||
$arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name'];
|
||||
}
|
||||
asort($arrayoflabels);
|
||||
print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ? GETPOST('model') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print $form->selectarray('modelcard', $arrayoflabels, (GETPOST('modelcard') ? GETPOST('modelcard') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans("BuildDoc").'">';
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -2338,12 +2338,12 @@ class Adherent extends CommonObject
|
||||
}
|
||||
} elseif ($status == self::STATUS_RESILIATED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans("MemberStatusResiliated");
|
||||
$labelStatusShort = $langs->trans("MemberStatusResiliatedShort");
|
||||
$labelStatus = $langs->transnoentitiesnoconv("MemberStatusResiliated");
|
||||
$labelStatusShort = $langs->transnoentitiesnoconv("MemberStatusResiliatedShort");
|
||||
} elseif ($status == self::STATUS_EXCLUDED) {
|
||||
$statusType = 'status10';
|
||||
$labelStatus = $langs->trans("MemberStatusExcluded");
|
||||
$labelStatusShort = $langs->trans("MemberStatusExcludedShort");
|
||||
$labelStatus = $langs->transnoentitiesnoconv("MemberStatusExcluded");
|
||||
$labelStatusShort = $langs->transnoentitiesnoconv("MemberStatusExcludedShort");
|
||||
}
|
||||
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||
|
||||
@ -737,10 +737,10 @@ class AdherentType extends CommonObject
|
||||
}
|
||||
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||
$this->labelStatus[0] = $langs->trans("ActivityCeased");
|
||||
$this->labelStatus[1] = $langs->trans("InActivity");
|
||||
$this->labelStatusShort[0] = $langs->trans("ActivityCeased");
|
||||
$this->labelStatusShort[1] = $langs->trans("InActivity");
|
||||
$this->labelStatus[0] = $langs->transnoentitiesnoconv("ActivityCeased");
|
||||
$this->labelStatus[1] = $langs->transnoentitiesnoconv("InActivity");
|
||||
$this->labelStatusShort[0] = $langs->transnoentitiesnoconv("ActivityCeased");
|
||||
$this->labelStatusShort[1] = $langs->transnoentitiesnoconv("InActivity");
|
||||
}
|
||||
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
|
||||
@ -962,7 +962,7 @@ while ($i < min($num, $limit)) {
|
||||
// Firstname
|
||||
if (!empty($arrayfields['d.firstname']['checked'])) {
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).'">';
|
||||
print $memberstatic->getNomUrl(0, 0, 'card', 'fistname');
|
||||
print $memberstatic->getNomUrl(0, 0, 'card', 'firstname');
|
||||
//print $obj->firstname;
|
||||
print "</td>\n";
|
||||
if (!$i) {
|
||||
|
||||
@ -161,40 +161,40 @@ if ($mode) {
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($mode == 'memberbycountry') {
|
||||
$data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? $langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))),
|
||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))),
|
||||
'code'=>$obj->code,
|
||||
'nb'=>$obj->nb,
|
||||
'lastdate'=>$db->jdate($obj->lastdate),
|
||||
'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate)
|
||||
$data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
|
||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
|
||||
'code'=>$obj->code,
|
||||
'nb'=>$obj->nb,
|
||||
'lastdate'=>$db->jdate($obj->lastdate),
|
||||
'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate)
|
||||
);
|
||||
}
|
||||
if ($mode == 'memberbyregion') { //+
|
||||
$data[] = array(
|
||||
'label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? $langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))),
|
||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))),
|
||||
'label2'=>($obj->label2 ? $obj->label2 : $langs->trans("Unknown")),
|
||||
'label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
|
||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label :'<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
|
||||
'label2'=>($obj->label2 ? $obj->label2 : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>'),
|
||||
'nb'=>$obj->nb,
|
||||
'lastdate'=>$db->jdate($obj->lastdate),
|
||||
'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate)
|
||||
);
|
||||
}
|
||||
if ($mode == 'memberbystate') {
|
||||
$data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? $langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))),
|
||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))),
|
||||
'label2'=>($obj->label2 ? $obj->label2 : $langs->trans("Unknown")),
|
||||
'nb'=>$obj->nb,
|
||||
'lastdate'=>$db->jdate($obj->lastdate),
|
||||
'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate)
|
||||
$data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
|
||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
|
||||
'label2'=>($obj->label2 ? $obj->label2 : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>'),
|
||||
'nb'=>$obj->nb,
|
||||
'lastdate'=>$db->jdate($obj->lastdate),
|
||||
'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate)
|
||||
);
|
||||
}
|
||||
if ($mode == 'memberbytown') {
|
||||
$data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? $langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))),
|
||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))),
|
||||
'label2'=>($obj->label2 ? $obj->label2 : $langs->trans("Unknown")),
|
||||
'nb'=>$obj->nb,
|
||||
'lastdate'=>$db->jdate($obj->lastdate),
|
||||
'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate)
|
||||
$data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
|
||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
|
||||
'label2'=>($obj->label2 ? $obj->label2 : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>'),
|
||||
'nb'=>$obj->nb,
|
||||
'lastdate'=>$db->jdate($obj->lastdate),
|
||||
'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -963,7 +963,7 @@ if ($rowid > 0) {
|
||||
|
||||
if ($adht->subscription) {
|
||||
// Amount
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="subscription" size="6" value="'.GETPOST('subscription').'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="subscription" size="6" value="'. price(GETPOSTISSET('subscription') ? GETPOST('subscription') : $adht->amount).'"> '.$langs->trans("Currency".$conf->currency) .'</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
|
||||
@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
echo "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
echo "<!-- BEGIN PHP TEMPLATE adherents/tpl/linkedopjectblock.tpl.php -->\n";
|
||||
|
||||
global $user;
|
||||
|
||||
@ -35,7 +35,7 @@ $total = 0;
|
||||
foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
echo '<tr class="oddeven">';
|
||||
echo '<td>'.$langs->trans("Subscription").'</td>';
|
||||
echo '<td>'.$objectlink->getNomUrl(1).'</td>';
|
||||
echo '<td class="nowraponall">'.$objectlink->getNomUrl(1).'</td>';
|
||||
echo '<td class="center"></td>';
|
||||
echo '<td class="center">'.dol_print_date($objectlink->dateh, 'day').'</td>';
|
||||
echo '<td class="right">';
|
||||
|
||||
@ -94,7 +94,7 @@ $formcompany = new FormCompany($db);
|
||||
$countrynotdefined = '<span class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</span>';
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("AccountantDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
/**
|
||||
* Edit parameters
|
||||
@ -115,7 +115,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<table class="noborder centpercent editmode">';
|
||||
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||
print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||
|
||||
// Name
|
||||
print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||
|
||||
@ -378,7 +378,7 @@ $head = company_admin_prepare_head();
|
||||
print dol_get_fiche_head($head, 'company', $langs->trans("Company"), -1, 'company');
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Save"))."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
|
||||
/**
|
||||
@ -457,7 +457,7 @@ print '</td></tr>'."\n";
|
||||
// Email
|
||||
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||
print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input class="maxwidth150" name="mail" id="email" value="'.dol_escape_htmltag((GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_MAIL) ? $conf->global->MAIN_INFO_SOCIETE_MAIL : ''))).'"></td></tr>';
|
||||
print '<input class="width300" name="mail" id="email" value="'.dol_escape_htmltag((GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_MAIL) ? $conf->global->MAIN_INFO_SOCIETE_MAIL : ''))).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Web
|
||||
|
||||
@ -104,13 +104,11 @@ print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
// Social networks
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent editmode">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="titlefield">'.$langs->trans("SocialNetworksInformation").'</td><td>'.$langs->trans("Url").'</td><td>'.$langs->trans("SocialNetworkId").'</td><td></td>';
|
||||
print '<td class="titlefieldcreate">'.$langs->trans("SocialNetworksInformation").'</td><td>'.$langs->trans("Url").'</td><td>'.$langs->trans("SocialNetworkId").'</td><td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -133,7 +131,6 @@ foreach ($listofnetworks as $key => $value) {
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ if ($result) {
|
||||
|
||||
print "\n";
|
||||
|
||||
print '<tr class="oddeven"><td>'.$obj->name.'</td>'."\n";
|
||||
print '<tr class="oddeven" data-checkbox-id="check_'.$i.'"><td>'.$obj->name.'</td>'."\n";
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||
* Copyright (C) 2011-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2011-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2019-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
@ -220,7 +220,7 @@ $tabsql[21] = "SELECT c.rowid as rowid, c.code, c.label, c.active, c.position FR
|
||||
$tabsql[22] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason";
|
||||
$tabsql[23] = "SELECT t.rowid as rowid, t.taux, t.revenuestamp_type, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid";
|
||||
$tabsql[24] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource";
|
||||
$tabsql[25] = "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity IN (".getEntity('c_type_container').")";
|
||||
$tabsql[25] = "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity = ".getEntity($tabname[25]);
|
||||
//$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units";
|
||||
$tabsql[27] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcomm";
|
||||
$tabsql[28] = "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newbymonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
||||
@ -232,8 +232,8 @@ $tabsql[33] = "SELECT rowid, pos, code, label, active FROM ".MAIN_DB_PREFIX."c_h
|
||||
$tabsql[34] = "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PREFIX."c_hrm_function";
|
||||
$tabsql[35] = "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c";
|
||||
$tabsql[36] = "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r";
|
||||
$tabsql[37] = "SELECT r.rowid, r.code, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r";
|
||||
$tabsql[38] = "SELECT rowid, entity, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks";
|
||||
$tabsql[37] = "SELECT r.rowid, r.code, r.sortorder, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r";
|
||||
$tabsql[38] = "SELECT s.rowid, s.entity, s.code, s.label, s.url, s.icon, s.active FROM ".MAIN_DB_PREFIX."c_socialnetworks as s WHERE s.entity = ".getEntity($tabname[38]);
|
||||
$tabsql[39] = "SELECT code, label as libelle, sortorder, active FROM ".MAIN_DB_PREFIX."c_prospectcontactlevel";
|
||||
$tabsql[40] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcommcontact";
|
||||
$tabsql[41] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_transport_mode";
|
||||
@ -278,7 +278,7 @@ $tabsqlsort[33] = "code ASC";
|
||||
$tabsqlsort[34] = "code ASC";
|
||||
$tabsqlsort[35] = "c.label ASC";
|
||||
$tabsqlsort[36] = "r.fk_c_exp_tax_cat ASC, r.range_ik ASC";
|
||||
$tabsqlsort[37] = "r.unit_type ASC, r.scale ASC, r.code ASC";
|
||||
$tabsqlsort[37] = "sortorder ASC";
|
||||
$tabsqlsort[38] = "rowid, code ASC";
|
||||
$tabsqlsort[39] = "sortorder ASC";
|
||||
$tabsqlsort[40] = "code ASC";
|
||||
@ -324,7 +324,7 @@ $tabfield[33] = "code,label";
|
||||
$tabfield[34] = "code,label";
|
||||
$tabfield[35] = "label";
|
||||
$tabfield[36] = "range_ik,fk_c_exp_tax_cat";
|
||||
$tabfield[37] = "code,label,short_label,unit_type,scale";
|
||||
$tabfield[37] = "code,label,short_label,unit_type,scale,sortorder";
|
||||
$tabfield[38] = "code,label,url,icon,entity";
|
||||
$tabfield[39] = "code,libelle,sortorder";
|
||||
$tabfield[40] = "code,libelle,picto";
|
||||
@ -370,7 +370,7 @@ $tabfieldvalue[33] = "code,label";
|
||||
$tabfieldvalue[34] = "code,label";
|
||||
$tabfieldvalue[35] = "label";
|
||||
$tabfieldvalue[36] = "range_ik,fk_c_exp_tax_cat";
|
||||
$tabfieldvalue[37] = "code,label,short_label,unit_type,scale";
|
||||
$tabfieldvalue[37] = "code,label,short_label,unit_type,scale,sortorder";
|
||||
$tabfieldvalue[38] = "code,label,url,icon";
|
||||
$tabfieldvalue[39] = "code,libelle,sortorder";
|
||||
$tabfieldvalue[40] = "code,libelle,picto";
|
||||
@ -417,7 +417,7 @@ $tabfieldinsert[33] = "code,label";
|
||||
$tabfieldinsert[34] = "code,label";
|
||||
$tabfieldinsert[35] = "label";
|
||||
$tabfieldinsert[36] = "range_ik,fk_c_exp_tax_cat";
|
||||
$tabfieldinsert[37] = "code,label,short_label,unit_type,scale";
|
||||
$tabfieldinsert[37] = "code,label,short_label,unit_type,scale,sortorder";
|
||||
$tabfieldinsert[38] = "code,label,url,icon,entity";
|
||||
$tabfieldinsert[39] = "code,label,sortorder";
|
||||
$tabfieldinsert[40] = "code,libelle,picto";
|
||||
@ -1457,6 +1457,10 @@ if ($id) {
|
||||
print $tdsoffields;
|
||||
|
||||
|
||||
// Line to enter new values
|
||||
print '<!-- line to add new entry -->';
|
||||
print '<tr class="oddeven nodrag nodrop nohover">';
|
||||
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
if (GETPOST('actionadd')) {
|
||||
@ -1476,9 +1480,6 @@ if ($id) {
|
||||
unset($fieldlist[2]); // Remove field ??? if dictionary Regions
|
||||
}
|
||||
|
||||
// Line to enter new values
|
||||
print '<!-- line to add new entry -->';
|
||||
print '<tr class="oddeven nodrag nodrop nohover">';
|
||||
|
||||
if (empty($reshook)) {
|
||||
fieldList($fieldlist, $obj, $tabname[$id], 'add');
|
||||
@ -1973,7 +1974,7 @@ if ($id) {
|
||||
}
|
||||
}
|
||||
} elseif ($value == 'fk_c_exp_tax_cat') {
|
||||
$valuetoshow = getDictvalue(MAIN_DB_PREFIX.'c_exp_tax_cat', 'label', $valuetoshow);
|
||||
$valuetoshow = getDictionaryValue(MAIN_DB_PREFIX.'c_exp_tax_cat', 'label', $valuetoshow);
|
||||
$valuetoshow = $langs->trans($valuetoshow);
|
||||
} elseif ($tabname[$id] == MAIN_DB_PREFIX.'c_exp_tax_cat') {
|
||||
$valuetoshow = $langs->trans($valuetoshow);
|
||||
|
||||
@ -530,7 +530,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($val['isameasure'])) {
|
||||
if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
|
||||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
|
||||
}
|
||||
|
||||
@ -107,6 +107,8 @@ $head = security_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'audit', '', -1);
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print getTitleFieldOfList("LogEvents", 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, '')."\n";
|
||||
|
||||
@ -257,11 +257,12 @@ foreach ($rules as $rule) {
|
||||
if ($rule->fk_c_type_fees == -1) {
|
||||
echo $langs->trans('AllExpenseReport');
|
||||
} else {
|
||||
$key = getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'code', $rule->fk_c_type_fees, false, 'id');
|
||||
if ($key != $langs->trans($key)) {
|
||||
$key = getDictionaryValue(MAIN_DB_PREFIX.'c_type_fees', 'code', $rule->fk_c_type_fees, false, 'id');
|
||||
if ($key && $key != $langs->trans($key)) {
|
||||
echo $langs->trans($key);
|
||||
} else {
|
||||
echo $langs->trans(getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'label', $rule->fk_c_type_fees, false, 'id')); // TODO check to return trans of 'code'
|
||||
$value = getDictionaryValue(MAIN_DB_PREFIX.'c_type_fees', 'label', $rule->fk_c_type_fees, false, 'id');
|
||||
echo $langs->trans($value ? $value : 'Undefined'); // TODO check to return trans of 'code'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file hrm/admin/setup.php
|
||||
* \file htdocs/admin/hrm.php
|
||||
* \ingroup hrm
|
||||
* \brief HrmTest setup page.
|
||||
*/
|
||||
|
||||
@ -299,6 +299,8 @@ $head = ihm_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, $mode, '', -1, '');
|
||||
|
||||
print '<br>';
|
||||
|
||||
clearstatcache();
|
||||
|
||||
if ($mode == 'template') {
|
||||
@ -451,11 +453,11 @@ if ($mode == 'other') {
|
||||
print '</table>' . "\n";
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Other
|
||||
@ -577,9 +579,9 @@ if ($mode == 'login') {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmax45">';
|
||||
print $langs->trans("Parameter");
|
||||
print '</td><td class="titlefieldmiddle">';
|
||||
print '</td><td>';
|
||||
print $langs->trans("Value");
|
||||
print '</td></tr>';
|
||||
|
||||
@ -630,7 +632,6 @@ if ($mode == 'login') {
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
|
||||
print '</div>';
|
||||
|
||||
@ -83,7 +83,8 @@ if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INF
|
||||
$setupcompanynotcomplete = 1;
|
||||
}
|
||||
print img_picto('', 'company', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit&token='.newToken()), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup"));
|
||||
print '<br><br>'.$langs->trans("SetupDescription3b");
|
||||
print '<br><br>';
|
||||
print $langs->trans("SetupDescription3b");
|
||||
if (!empty($setupcompanynotcomplete)) {
|
||||
$langs->load("errors");
|
||||
$warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"');
|
||||
@ -92,6 +93,7 @@ if (!empty($setupcompanynotcomplete)) {
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Show info setup module
|
||||
print img_picto('', 'cog', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules"));
|
||||
|
||||
@ -292,7 +292,7 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
|
||||
clearstatcache();
|
||||
@ -543,7 +543,7 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><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">';
|
||||
|
||||
@ -243,7 +243,7 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common_emailing', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
|
||||
clearstatcache();
|
||||
@ -412,7 +412,7 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common_emailing', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
@ -597,7 +597,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($val['isameasure'])) {
|
||||
if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
|
||||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
|
||||
}
|
||||
|
||||
@ -894,7 +894,7 @@ if ($resql) {
|
||||
$valuetoshow = $langs->trans("Content"); $showfield = 0;
|
||||
}
|
||||
if ($fieldlist[$field] == 'content_lines') {
|
||||
$valuetoshow = $langs->trans("ContentLines"); $showfield = 0;
|
||||
$valuetoshow = $langs->trans("ContentForLines"); $showfield = 0;
|
||||
}
|
||||
|
||||
// Show fields
|
||||
@ -973,6 +973,14 @@ if ($resql) {
|
||||
$doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 500, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%');
|
||||
print $doleditor->Create(1);
|
||||
}
|
||||
if ($tmpfieldlist == 'content_lines') {
|
||||
print $form->textwithpicto($langs->trans("ContentForLines"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'<br>';
|
||||
$okforextended = true;
|
||||
if (empty($conf->global->FCKEDITOR_ENABLE_MAIL))
|
||||
$okforextended = false;
|
||||
$doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%');
|
||||
print $doleditor->Create(1);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
@ -1114,35 +1122,6 @@ if ($resql) {
|
||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
/*
|
||||
$fieldsforcontent = array('content');
|
||||
if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES))
|
||||
{
|
||||
$fieldsforcontent = array('content', 'content_lines');
|
||||
}
|
||||
foreach ($fieldsforcontent as $tmpfieldlist)
|
||||
{
|
||||
$showfield = 1;
|
||||
$align = "left";
|
||||
$valuetoshow = $obj->{$tmpfieldlist};
|
||||
|
||||
$class = 'tddict';
|
||||
// Show value for field
|
||||
if ($showfield) {
|
||||
|
||||
print '</tr><tr class="oddeven" nohover tr-'.$tmpfieldlist.'-'.$i.' "><td colspan="5">'; // To create an artificial CR for the current tr we are on
|
||||
$okforextended = true;
|
||||
if (empty($conf->global->FCKEDITOR_ENABLE_MAIL))
|
||||
$okforextended = false;
|
||||
$doleditor = new DolEditor($tmpfieldlist.'-'.$i, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%', 1);
|
||||
print $doleditor->Create(1);
|
||||
print '</td>';
|
||||
print '<td></td><td></td><td></td>';
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -232,7 +232,7 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common_ticket', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
|
||||
clearstatcache();
|
||||
@ -387,7 +387,7 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common_ticket', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
@ -81,7 +81,7 @@ $head = company_admin_prepare_head();
|
||||
print dol_get_fiche_head($head, 'openinghours', $langs->trans("Company"), -1, 'company');
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("OpeningHoursDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
if (empty($action) || $action == 'edit' || $action == 'updateedit') {
|
||||
/**
|
||||
@ -92,7 +92,7 @@ if (empty($action) || $action == 'edit' || $action == 'updateedit') {
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<table class="noborder centpercent editmode">';
|
||||
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("Day").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||
print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans("Day").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("Monday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -165,6 +166,10 @@ if ($action == 'update') {
|
||||
dolibarr_set_const($db, "PDF_SHOW_LINK_TO_ONLINE_PAYMENT", GETPOST('PDF_SHOW_LINK_TO_ONLINE_PAYMENT', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('PDF_USE_A')) {
|
||||
dolibarr_set_const($db, "PDF_USE_A", GETPOST('PDF_USE_A', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||
@ -534,6 +539,14 @@ if ($conf->use_javascript_ajax) {
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_A").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('PDF_USE_A');
|
||||
} else {
|
||||
print $form->selectyesno('PDF_USE_A', (empty($conf->global->PDF_USE_A) ? 0 : $conf->global->PDF_USE_A), 1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -41,17 +41,12 @@ if (!$user->admin) {
|
||||
}
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($cancel) {
|
||||
$action = '';
|
||||
}
|
||||
|
||||
if ($action == 'update') {
|
||||
if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
|
||||
dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity);
|
||||
@ -62,6 +57,9 @@ if ($action == 'update') {
|
||||
if (GETPOSTISSET('MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_PROPOSALS_WITH_PICTURE", GETPOST("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
|
||||
dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOST("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
||||
@ -92,45 +90,47 @@ $tooltiptext = '';
|
||||
print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print load_fiche_titre($langs->trans("Proposal"), '', '');
|
||||
if (!empty($conf->propal->enabled)) {
|
||||
print load_fiche_titre($langs->trans("Proposal"), '', '');
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE");
|
||||
print ' <span class="opacitymedium">('.$langs->trans("RandomlySelectedIfSeveral").')</span>';
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE");
|
||||
print ' <span class="opacitymedium">('.$langs->trans("RandomlySelectedIfSeveral").')</span>';
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
/*
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
|
||||
}
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
/*
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
|
||||
}
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button button-save" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
print $form->buttonsSaveCancel();
|
||||
*/
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
|
||||
@ -95,6 +95,7 @@ $head = security_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'proxy', '', -1);
|
||||
|
||||
print '<br>';
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
|
||||
@ -188,8 +188,9 @@ $head = security_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'passwords', '', -1);
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Choix du gestionnaire du generateur de mot de passe
|
||||
// Select manager to generate passwords
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
@ -101,9 +101,9 @@ $head = security_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'file', '', -1);
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Upload options
|
||||
$var = false;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
@ -153,8 +153,8 @@ if (ini_get('safe_mode') && !empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) {
|
||||
dol_syslog("safe_mode is on, basedir is ".$basedir.", safe_mode_exec_dir is ".ini_get('safe_mode_exec_dir'), LOG_WARNING);
|
||||
}
|
||||
}
|
||||
print '<input type="text" '.(defined('MAIN_ANTIVIRUS_COMMAND') ? 'disabled ' : '').'name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.(!empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ?dol_escape_htmltag($conf->global->MAIN_ANTIVIRUS_COMMAND) : '').'">';
|
||||
if (defined('MAIN_ANTIVIRUS_COMMAND')) {
|
||||
print '<input type="text" '.((defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) ? 'disabled ' : '').'name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.(!empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ?dol_escape_htmltag($conf->global->MAIN_ANTIVIRUS_COMMAND) : '').'">';
|
||||
if (defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) {
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("ValueIsForcedBySystem").'</span>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
@ -94,6 +94,7 @@ $head = security_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'misc', '', -1);
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Other Options
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
@ -644,7 +644,7 @@ print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MainDefaultWarehouse").'</td>';
|
||||
print '<td class="right">';
|
||||
print $formproduct->selectWarehouses($conf->global->MAIN_DEFAULT_WAREHOUSE, 'default_warehouse', '', 1, 0, 0, '', 0, 0, array(), 'left reposition');
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit small" value="'.$langs->trans("Modify").'">';
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -306,7 +306,7 @@ print empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? '' : img_picto('', 'tick').
|
||||
print yn(empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? 0 : 1);
|
||||
if (!empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) {
|
||||
print ' - '.$conf->global->MAIN_ANTIVIRUS_COMMAND;
|
||||
if (defined('MAIN_ANTIVIRUS_COMMAND')) {
|
||||
if (defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) {
|
||||
print ' - <span class="opacitymedium">'.$langs->trans("ValueIsForcedBySystem").'</span>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2018 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2021 Regis Houssin <regis.houssin@inodbox.com>
|
||||
*
|
||||
* 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
|
||||
@ -441,6 +441,11 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
'id' => 'radio_compression_bzip',
|
||||
'label' => $langs->trans("Bzip2")
|
||||
);
|
||||
$compression['zstd'] = array(
|
||||
'function' => 'zstd_compress',
|
||||
'id' => 'radio_compression_zstd',
|
||||
'label' => $langs->trans("Zstd")
|
||||
);
|
||||
$compression['none'] = array(
|
||||
'function' => '',
|
||||
'id' => 'radio_compression_none',
|
||||
|
||||
@ -2,20 +2,21 @@
|
||||
/* Copyright (C) 2006-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2021 Regis Houssin <regis.houssin@inodbox.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/tools/export.php
|
||||
|
||||
@ -2,20 +2,21 @@
|
||||
/* Copyright (C) 2006-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2021 Regis Houssin <regis.houssin@inodbox.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/tools/export_files.php
|
||||
@ -41,7 +42,7 @@ $file = trim(GETPOST('zipfilename_template', 'alpha'));
|
||||
$compression = GETPOST('compression', 'aZ09');
|
||||
|
||||
$file = dol_sanitizeFileName($file);
|
||||
$file = preg_replace('/(\.zip|\.tar|\.tgz|\.gz|\.tar\.gz|\.bz2)$/i', '', $file);
|
||||
$file = preg_replace('/(\.zip|\.tar|\.tgz|\.gz|\.tar\.gz|\.bz2|\.zst)$/i', '', $file);
|
||||
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
@ -137,7 +138,7 @@ if ($compression == 'zip') {
|
||||
$errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir);
|
||||
}
|
||||
}
|
||||
} elseif (in_array($compression, array('gz', 'bz'))) {
|
||||
} elseif (in_array($compression, array('gz', 'bz', 'zstd'))) {
|
||||
$userlogin = ($user->login ? $user->login : 'unknown');
|
||||
|
||||
$outputfile = $conf->admin->dir_temp.'/export_files.'.$userlogin.'.out'; // File used with popen method
|
||||
@ -156,9 +157,10 @@ if ($compression == 'zip') {
|
||||
} else {
|
||||
if ($compression == 'gz') {
|
||||
$cmd = "gzip -f ".$outputdir."/".$file;
|
||||
}
|
||||
if ($compression == 'bz') {
|
||||
} elseif ($compression == 'bz') {
|
||||
$cmd = "bzip2 -f ".$outputdir."/".$file;
|
||||
} elseif ($compression == 'zstd') {
|
||||
$cmd = "zstd -z -9 -q --rm ".$outputdir."/".$file;
|
||||
}
|
||||
|
||||
$result = $utils->executeCLI($cmd, $outputfile);
|
||||
|
||||
@ -458,7 +458,7 @@ if ($mode == 'searchkey') {
|
||||
}
|
||||
|
||||
//print 'param='.$param.' $_SERVER["PHP_SELF"]='.$_SERVER["PHP_SELF"].' num='.$num.' page='.$page.' nbtotalofrecords='.$nbtotalofrecords." sortfield=".$sortfield." sortorder=".$sortorder;
|
||||
$title = $langs->trans("TranslationKeySearch");
|
||||
$title = $langs->trans("Translation");
|
||||
if ($nbtotalofrecords > 0) {
|
||||
$title .= ' <span class="opacitymedium colorblack paddingleft">('.$nbtotalofrecords.' / '.$nbtotalofrecordswithoutfilters.' - '.$nbtotaloffiles.' '.$langs->trans("Files").')</span>';
|
||||
}
|
||||
|
||||
@ -390,11 +390,11 @@ class Asset extends CommonObject
|
||||
|
||||
$langs->load("contracts");
|
||||
$labelStatus = array();
|
||||
$labelStatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled');
|
||||
$labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled');
|
||||
$labelStatusShort = array();
|
||||
$labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled');
|
||||
$labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled');
|
||||
|
||||
$statusType = 'status0';
|
||||
if ($status == self::STATUS_VALIDATED) {
|
||||
|
||||
@ -523,7 +523,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($val['isameasure'])) {
|
||||
if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
|
||||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ if ($action == 'create') {
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
||||
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||
}
|
||||
print '<tbody>';
|
||||
print "</table>\n";
|
||||
|
||||
@ -655,7 +655,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($val['isameasure'])) {
|
||||
if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
|
||||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
print "<!-- BEGIN PHP TEMPLATE bom/tpl/linkedopjectblock.tpl.php -->\n";
|
||||
|
||||
global $user, $db;
|
||||
global $noMoreLinkedObjectBlockAfter;
|
||||
|
||||
@ -154,9 +154,9 @@ if ($action == 'create') {
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewBookmark"));
|
||||
print load_fiche_titre($langs->trans("NewBookmark"), '', 'bookmark');
|
||||
|
||||
print dol_get_fiche_head($head, $hselected, $langs->trans("Bookmark"), -1, 'bookmark');
|
||||
print dol_get_fiche_head(null, 'bookmark', '', 0, '');
|
||||
|
||||
print '<table class="border centpercent tableforfieldcreate">';
|
||||
|
||||
@ -164,23 +164,23 @@ if ($action == 'create') {
|
||||
dol_set_focus('#titlebookmark');
|
||||
|
||||
// Url
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("UrlOrLink").'</td><td><input class="flat quatrevingtpercent" name="url" value="'.dol_escape_htmltag($url).'"></td><td class="hideonsmartphone"><span class="opacitymedium">'.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'</span></td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("UrlOrLink").'</td><td><input class="flat quatrevingtpercent minwidth500" name="url" value="'.dol_escape_htmltag($url).'"></td><td class="hideonsmartphone"><span class="opacitymedium">'.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'</span></td></tr>';
|
||||
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans("BehaviourOnClick").'</td><td>';
|
||||
$liste = array(0=>$langs->trans("ReplaceWindow"), 1=>$langs->trans("OpenANewWindow"));
|
||||
print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : 1);
|
||||
print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : 1, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
|
||||
print '</td><td class="hideonsmartphone"><span class="opacitymedium">'.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'</span></td></tr>';
|
||||
|
||||
// Owner
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300');
|
||||
print '</td><td class="hideonsmartphone"> </td></tr>';
|
||||
print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300 widthcentpercentminusx');
|
||||
print '</td><td class="hideonsmartphone"></td></tr>';
|
||||
|
||||
// Position
|
||||
print '<tr><td>'.$langs->trans("Position").'</td><td>';
|
||||
print '<input class="flat" name="position" size="5" value="'.(GETPOSTISSET("position") ? GETPOST("position", 'int') : $object->position).'">';
|
||||
print '</td><td class="hideonsmartphone"> </td></tr>';
|
||||
print '<input class="flat width50" name="position" value="'.(GETPOSTISSET("position") ? GETPOST("position", 'int') : $object->position).'">';
|
||||
print '</td><td class="hideonsmartphone"></td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@ -266,7 +266,7 @@ if ($user->rights->categorie->creer) {
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
||||
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -626,12 +626,18 @@ class Categorie extends CommonObject
|
||||
}
|
||||
|
||||
$arraydelete = array(
|
||||
'categorie_societe' => 'fk_categorie',
|
||||
'categorie_fournisseur' => 'fk_categorie',
|
||||
'categorie_product' => 'fk_categorie',
|
||||
'categorie_fournisseur' => 'fk_categorie',
|
||||
'categorie_societe' => 'fk_categorie',
|
||||
'categorie_member' => 'fk_categorie',
|
||||
'categorie_contact' => 'fk_categorie',
|
||||
'categorie_user' => 'fk_categorie',
|
||||
'categorie_project' => 'fk_categorie',
|
||||
'categorie_account' => 'fk_categorie',
|
||||
'categorie_website_page' => 'fk_categorie',
|
||||
'categorie_warehouse' => 'fk_categorie',
|
||||
'categorie_actioncomm' => 'fk_categorie',
|
||||
'categorie_ticket' => 'fk_categorie',
|
||||
'bank_class' => 'fk_categ',
|
||||
'categorie_lang' => 'fk_category',
|
||||
'categorie' => 'rowid',
|
||||
@ -728,8 +734,6 @@ class Categorie extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Call trigger
|
||||
$this->context = array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger
|
||||
$result = $this->call_trigger('CATEGORY_LINK', $user);
|
||||
@ -755,6 +759,8 @@ class Categorie extends CommonObject
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
@ -810,6 +816,8 @@ class Categorie extends CommonObject
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -770,7 +770,7 @@ if ($type == Categorie::TYPE_CONTACT) {
|
||||
print '<table class="noborder centpercent">'."\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Ref").'</td></tr>'."\n";
|
||||
|
||||
if (count($contacts) > 0) {
|
||||
if (is_array($contacts) && count($contacts) > 0) {
|
||||
$i = 0;
|
||||
foreach ($contacts as $key => $contact) {
|
||||
$i++;
|
||||
|
||||
@ -75,8 +75,13 @@ if ($complete == 'na' || $complete == -2) {
|
||||
$complete = -1;
|
||||
}
|
||||
|
||||
$datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||
$datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||
if ($fulldayevent) {
|
||||
$datep = dol_mktime('00', '00', 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||
$datef = dol_mktime('23', '59', '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||
} else {
|
||||
$datep = dol_mktime($aphour, $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||
$datef = dol_mktime($p2hour, $p2min, '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
@ -1298,7 +1303,7 @@ if ($action == 'create') {
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
||||
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -1465,18 +1465,18 @@ class ActionComm extends CommonObject
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
$labelStatus = $langs->trans('StatusNotApplicable');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('StatusNotApplicable');
|
||||
if ($percent == -1 && !$hidenastatus) {
|
||||
$labelStatus = $langs->trans('StatusNotApplicable');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('StatusNotApplicable');
|
||||
} elseif ($percent == 0) {
|
||||
$labelStatus = $langs->trans('StatusActionToDo').' (0%)';
|
||||
$labelStatus = $langs->transnoentitiesnoconv('StatusActionToDo').' (0%)';
|
||||
} elseif ($percent > 0 && $percent < 100) {
|
||||
$labelStatus = $langs->trans('StatusActionInProcess').' ('.$percent.'%)';
|
||||
$labelStatus = $langs->transnoentitiesnoconv('StatusActionInProcess').' ('.$percent.'%)';
|
||||
} elseif ($percent >= 100) {
|
||||
$labelStatus = $langs->trans('StatusActionDone').' (100%)';
|
||||
$labelStatus = $langs->transnoentitiesnoconv('StatusActionDone').' (100%)';
|
||||
}
|
||||
|
||||
$labelStatusShort = $langs->trans('StatusNotApplicable');
|
||||
$labelStatusShort = $langs->transnoentitiesnoconv('StatusNotApplicable');
|
||||
if ($percent == -1 && !$hidenastatus) {
|
||||
$labelStatusShort = $langs->trans('NA');
|
||||
} elseif ($percent == 0) {
|
||||
|
||||
@ -228,18 +228,18 @@ class ActionCommReminder extends CommonObject
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
$labelStatus = $langs->trans('ToDo');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('ToDo');
|
||||
if ($status == 1) {
|
||||
$labelStatus = $langs->trans('Done');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Done');
|
||||
} elseif ($status == -1) {
|
||||
$labelStatus = $langs->trans('Error');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Error');
|
||||
}
|
||||
|
||||
$labelStatusShort = $langs->trans('ToDo');
|
||||
$labelStatusShort = $langs->transnoentitiesnoconv('ToDo');
|
||||
if ($status == 1) {
|
||||
$labelStatus = $langs->trans('Done');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Done');
|
||||
} elseif ($status == -1) {
|
||||
$labelStatus = $langs->trans('Error');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Error');
|
||||
}
|
||||
|
||||
$statusType = 'status5';
|
||||
|
||||
@ -490,7 +490,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
|
||||
@ -625,22 +625,6 @@ print $nav;
|
||||
//print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
//print dol_get_fiche_end();
|
||||
|
||||
// Add link to show birthdays
|
||||
/*
|
||||
$link = '';
|
||||
if (empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$newparam=$param; // newparam is for birthday links
|
||||
$newparam=preg_replace('/showbirthday=[0-1]/i','showbirthday='.(empty($showbirthday)?1:0),$newparam);
|
||||
if (! preg_match('/showbirthday=/i',$newparam)) $newparam.='&showbirthday=1';
|
||||
$link='<a href="'.$_SERVER['PHP_SELF'];
|
||||
$link.='?'.$newparam;
|
||||
$link.='">';
|
||||
if (empty($showbirthday)) $link.=$langs->trans("AgendaShowBirthdayEvents");
|
||||
else $link.=$langs->trans("AgendaHideBirthdayEvents");
|
||||
$link.='</a>';
|
||||
}
|
||||
*/
|
||||
|
||||
$s = $newtitle;
|
||||
|
||||
@ -656,7 +640,7 @@ if (empty($reshook)) {
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
|
||||
@ -416,7 +416,7 @@ $massactionbutton = '';
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
|
||||
@ -426,7 +426,7 @@ $massactionbutton = '';
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
|
||||
@ -726,7 +726,7 @@ if ($action == 'create') {
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
print $object->showOptionals($extrafields, 'create');
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -776,8 +776,8 @@ class Mailing extends CommonObject
|
||||
global $langs;
|
||||
$langs->load("mailing");
|
||||
|
||||
$labelStatus = $langs->trans($this->statuts[$status]);
|
||||
$labelStatusShort = $langs->trans($this->statuts[$status]);
|
||||
$labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]);
|
||||
$labelStatusShort = $langs->transnoentitiesnoconv($this->statuts[$status]);
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
if ($status == 2) {
|
||||
@ -808,16 +808,16 @@ class Mailing extends CommonObject
|
||||
$labelStatus = array();
|
||||
$labelStatusShort = array();
|
||||
|
||||
$labelStatus[-1] = $langs->trans('MailingStatusError');
|
||||
$labelStatus[0] = $langs->trans('MailingStatusNotSent');
|
||||
$labelStatus[1] = $langs->trans('MailingStatusSent');
|
||||
$labelStatus[2] = $langs->trans('MailingStatusRead');
|
||||
$labelStatus[3] = $langs->trans('MailingStatusNotContact');
|
||||
$labelStatusShort[-1] = $langs->trans('MailingStatusError');
|
||||
$labelStatusShort[0] = $langs->trans('MailingStatusNotSent');
|
||||
$labelStatusShort[1] = $langs->trans('MailingStatusSent');
|
||||
$labelStatusShort[2] = $langs->trans('MailingStatusRead');
|
||||
$labelStatusShort[3] = $langs->trans('MailingStatusNotContact');
|
||||
$labelStatus[-1] = $langs->transnoentitiesnoconv('MailingStatusError');
|
||||
$labelStatus[0] = $langs->transnoentitiesnoconv('MailingStatusNotSent');
|
||||
$labelStatus[1] = $langs->transnoentitiesnoconv('MailingStatusSent');
|
||||
$labelStatus[2] = $langs->transnoentitiesnoconv('MailingStatusRead');
|
||||
$labelStatus[3] = $langs->transnoentitiesnoconv('MailingStatusNotContact');
|
||||
$labelStatusShort[-1] = $langs->transnoentitiesnoconv('MailingStatusError');
|
||||
$labelStatusShort[0] = $langs->transnoentitiesnoconv('MailingStatusNotSent');
|
||||
$labelStatusShort[1] = $langs->transnoentitiesnoconv('MailingStatusSent');
|
||||
$labelStatusShort[2] = $langs->transnoentitiesnoconv('MailingStatusRead');
|
||||
$labelStatusShort[3] = $langs->transnoentitiesnoconv('MailingStatusNotContact');
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
if ($status == -1) {
|
||||
|
||||
@ -2079,6 +2079,8 @@ if ($action == 'create') {
|
||||
$absolute_discount = price2num($absolute_discount, 'MT');
|
||||
$absolute_creditnote = price2num($absolute_creditnote, 'MT');
|
||||
|
||||
$caneditfield = ($object->statut != Propal::STATUS_SIGNED && $object->statut != Propal::STATUS_BILLED);
|
||||
|
||||
$thirdparty = $soc;
|
||||
$discount_type = 0;
|
||||
$backtopage = urlencode($_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
@ -2092,12 +2094,12 @@ if ($action == 'create') {
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DatePropal');
|
||||
print '</td>';
|
||||
if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) {
|
||||
if ($action != 'editdate' && $usercancreate && $caneditfield) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefield">';
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) {
|
||||
if ($action == 'editdate' && $usercancreate && $caneditfield) {
|
||||
print '<form name="editdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
@ -2119,12 +2121,12 @@ if ($action == 'create') {
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DateEndPropal');
|
||||
print '</td>';
|
||||
if ($action != 'editecheance' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) {
|
||||
if ($action != 'editecheance' && $usercancreate && $caneditfield) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editecheance&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefield">';
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) {
|
||||
if ($action == 'editecheance' && $usercancreate && $caneditfield) {
|
||||
print '<form name="editecheance" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setecheance">';
|
||||
@ -2149,12 +2151,12 @@ if ($action == 'create') {
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($action != 'editconditions' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) {
|
||||
if ($action != 'editconditions' && $usercancreate && $caneditfield) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetConditions'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefield">';
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editconditions' && $usercancreate) {
|
||||
if ($action == 'editconditions' && $usercancreate && $caneditfield) {
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id');
|
||||
} else {
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none');
|
||||
@ -2168,12 +2170,12 @@ if ($action == 'create') {
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) {
|
||||
if ($action != 'editmode' && $usercancreate && $caneditfield) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefieldcreate">';
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmode' && $usercancreate) {
|
||||
if ($action == 'editmode' && $usercancreate && $caneditfield) {
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
|
||||
} else {
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none');
|
||||
@ -2183,26 +2185,27 @@ if ($action == 'create') {
|
||||
// Delivery date
|
||||
$langs->load('deliveries');
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate, 'datepicker');
|
||||
print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate && $caneditfield, 'datepicker');
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate, 'datepicker');
|
||||
print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate && $caneditfield, 'datepicker');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Delivery delay
|
||||
print '<tr class="fielddeliverydelay"><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('AvailabilityPeriod');
|
||||
if (!empty($conf->commande->enabled)) {
|
||||
print ' ('.$langs->trans('AfterOrder').')';
|
||||
print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod').' ('.$langs->trans('AfterOrder').')');
|
||||
} else {
|
||||
print $langs->trans('AvailabilityPeriod');
|
||||
}
|
||||
print '</td>';
|
||||
if ($action != 'editavailability' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) {
|
||||
if ($action != 'editavailability' && $usercancreate && $caneditfield) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editavailability&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefield">';
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editavailability' && $usercancreate) {
|
||||
if ($action == 'editavailability' && $usercancreate && $caneditfield) {
|
||||
$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1);
|
||||
} else {
|
||||
$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'none', 1);
|
||||
@ -2217,12 +2220,12 @@ if ($action == 'create') {
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('SendingMethod');
|
||||
print '</td>';
|
||||
if ($action != 'editshippingmethod' && $usercancreate) {
|
||||
if ($action != 'editshippingmethod' && $usercancreate && $caneditfield) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefield">';
|
||||
if ($action == 'editshippingmethod' && $usercancreate) {
|
||||
if ($action == 'editshippingmethod' && $usercancreate && $caneditfield) {
|
||||
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
|
||||
} else {
|
||||
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'none');
|
||||
@ -2254,12 +2257,12 @@ if ($action == 'create') {
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Source');
|
||||
print '</td>';
|
||||
if ($action != 'editdemandreason' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) {
|
||||
if ($action != 'editdemandreason' && $usercancreate) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdemandreason&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefield">';
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdemandreason' && $usercancreate) {
|
||||
if ($action == 'editdemandreason' && $usercancreate) {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||
} else {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'none');
|
||||
@ -2356,13 +2359,13 @@ if ($action == 'create') {
|
||||
if ($totalWeight) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
||||
print '<td class="valuefield">';
|
||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
|
||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no', 0);
|
||||
print '</td></tr>';
|
||||
}
|
||||
if ($totalVolume) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
||||
print '<td class="valuefield">';
|
||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
|
||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no', 0);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -2372,7 +2375,7 @@ if ($action == 'create') {
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
print '<td><td class="right">';
|
||||
if ($usercancreate) {
|
||||
if ($action != 'editincoterm' && $usercancreate && $caneditfield) {
|
||||
print '<a class="editfielda" href="'.DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>';
|
||||
} else {
|
||||
print ' ';
|
||||
@ -2380,10 +2383,10 @@ if ($action == 'create') {
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td class="valuefield">';
|
||||
if ($action != 'editincoterm') {
|
||||
print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
|
||||
} else {
|
||||
if ($action == 'editincoterm' && $usercancreate && $caneditfield) {
|
||||
print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id);
|
||||
} else {
|
||||
print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -2563,8 +2563,13 @@ class Propal extends CommonObject
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
// PDF
|
||||
$hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||
$hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||
$hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||
|
||||
//$ret=$object->fetch($id); // Reload to get new records
|
||||
$this->generateDocument($modelpdf, $outputlangs);
|
||||
$this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
@ -2651,8 +2656,13 @@ class Propal extends CommonObject
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
// PDF
|
||||
$hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||
$hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||
$hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||
|
||||
//$ret=$object->fetch($id); // Reload to get new records
|
||||
$this->generateDocument($modelpdf, $outputlangs);
|
||||
$this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
$this->oldcopy = clone $this;
|
||||
|
||||
@ -30,7 +30,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
}
|
||||
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
print "<!-- BEGIN PHP TEMPLATE comm/propal/tpl/linkedopjectblock.tpl.php -->\n";
|
||||
|
||||
global $user;
|
||||
|
||||
|
||||
@ -1494,13 +1494,13 @@ if ($action == 'create' && $usercancreate) {
|
||||
$cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0)); // TODO maybe add default value option
|
||||
$mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0));
|
||||
$fk_account = (!empty($objectsrc->fk_account) ? $objectsrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0));
|
||||
$availability_id = (!empty($objectsrc->availability_id) ? $objectsrc->availability_id : (!empty($soc->availability_id) ? $soc->availability_id : 0));
|
||||
$availability_id = (!empty($objectsrc->availability_id) ? $objectsrc->availability_id : 0);
|
||||
$shipping_method_id = (!empty($objectsrc->shipping_method_id) ? $objectsrc->shipping_method_id : (!empty($soc->shipping_method_id) ? $soc->shipping_method_id : 0));
|
||||
$warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0));
|
||||
$demand_reason_id = (!empty($objectsrc->demand_reason_id) ? $objectsrc->demand_reason_id : (!empty($soc->demand_reason_id) ? $soc->demand_reason_id : 0));
|
||||
$remise_percent = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_percent) ? $soc->remise_percent : 0));
|
||||
$remise_absolue = (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0));
|
||||
$dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER) ?-1 : '';
|
||||
$dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER) ? -1 : '';
|
||||
|
||||
$date_delivery = (!empty($objectsrc->delivery_date) ? $objectsrc->delivery_date : '');
|
||||
if (empty($date_delivery)) {
|
||||
@ -1526,7 +1526,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
$cond_reglement_id = $soc->cond_reglement_id;
|
||||
$mode_reglement_id = $soc->mode_reglement_id;
|
||||
$fk_account = $soc->fk_account;
|
||||
$availability_id = $soc->availability_id;
|
||||
$availability_id = 0;
|
||||
$shipping_method_id = $soc->shipping_method_id;
|
||||
$warehouse_id = $soc->warehouse_id;
|
||||
$demand_reason_id = $soc->demand_reason_id;
|
||||
@ -1646,13 +1646,19 @@ if ($action == 'create' && $usercancreate) {
|
||||
print "</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
// Delivery delay
|
||||
print '<tr class="fielddeliverydelay"><td>'.$langs->trans('AvailabilityPeriod').'</td><td>';
|
||||
print img_picto('', 'clock', 'class="pictofixedwidth"');
|
||||
$form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx');
|
||||
print '</td></tr>';
|
||||
|
||||
// Terms of the settlement
|
||||
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
|
||||
print img_picto('', 'paiment');
|
||||
$form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', - 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Mode de reglement
|
||||
// Payment mode
|
||||
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>';
|
||||
print img_picto('', 'bank', 'class="pictofixedwidth"');
|
||||
$form->select_types_paiements($mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx');
|
||||
@ -1665,12 +1671,6 @@ if ($action == 'create' && $usercancreate) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Delivery delay
|
||||
print '<tr class="fielddeliverydelay"><td>'.$langs->trans('AvailabilityPeriod').'</td><td>';
|
||||
print img_picto('', 'clock', 'class="pictofixedwidth"');
|
||||
$form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx');
|
||||
print '</td></tr>';
|
||||
|
||||
// Shipping Method
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
print '<tr><td>'.$langs->trans('SendingMethod').'</td><td>';
|
||||
@ -1737,7 +1737,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
}
|
||||
};
|
||||
|
||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
||||
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||
}
|
||||
|
||||
// Template to use by default
|
||||
@ -2148,7 +2148,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
print '</form>';
|
||||
} else {
|
||||
print $object->date ? dol_print_date($object->date, 'day') : ' ';
|
||||
if ($object->hasDelay()) {
|
||||
if ($object->hasDelay() && empty($object->delivery_date)) { // If there is a delivery date planned, warning should be on this date
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
||||
}
|
||||
}
|
||||
@ -2176,6 +2176,18 @@ if ($action == 'create' && $usercancreate) {
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Delivery delay
|
||||
print '<tr class="fielddeliverydelay"><td>';
|
||||
$editenable = $usercancreate;
|
||||
print $form->editfieldkey("AvailabilityPeriod", 'availability', '', $object, $editenable);
|
||||
print '</td><td class="valuefield">';
|
||||
if ($action == 'editavailability') {
|
||||
$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1);
|
||||
} else {
|
||||
$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'none', 1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Shipping Method
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
print '<tr><td>';
|
||||
@ -2209,6 +2221,18 @@ if ($action == 'create' && $usercancreate) {
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Source reason (why we have an order)
|
||||
print '<tr><td>';
|
||||
$editenable = $usercancreate;
|
||||
print $form->editfieldkey("Source", 'demandreason', '', $object, $editenable);
|
||||
print '</td><td class="valuefield">';
|
||||
if ($action == 'editdemandreason') {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||
} else {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'none');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Terms of payment
|
||||
print '<tr><td>';
|
||||
$editenable = $usercancreate;
|
||||
@ -2274,30 +2298,6 @@ if ($action == 'create' && $usercancreate) {
|
||||
}
|
||||
}
|
||||
|
||||
// Delivery delay
|
||||
print '<tr class="fielddeliverydelay"><td>';
|
||||
$editenable = $usercancreate;
|
||||
print $form->editfieldkey("AvailabilityPeriod", 'availability', '', $object, $editenable);
|
||||
print '</td><td class="valuefield">';
|
||||
if ($action == 'editavailability') {
|
||||
$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1);
|
||||
} else {
|
||||
$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'none', 1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Source reason (why we have an ordrer)
|
||||
print '<tr><td>';
|
||||
$editenable = $usercancreate;
|
||||
print $form->editfieldkey("Channel", 'demandreason', '', $object, $editenable);
|
||||
print '</td><td class="valuefield">';
|
||||
if ($action == 'editdemandreason') {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||
} else {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'none');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// TODO Order mode (how we receive order). Not yet implemented
|
||||
/*
|
||||
print '<tr><td>';
|
||||
|
||||
@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
print "<!-- BEGIN PHP TEMPLATE commande/tpl/linkedopjectblock.tpl.php -->\n";
|
||||
|
||||
global $user;
|
||||
global $noMoreLinkedObjectBlockAfter;
|
||||
|
||||
@ -463,7 +463,7 @@ if ($action == 'create') {
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
||||
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -1125,12 +1125,12 @@ class Account extends CommonObject
|
||||
$langs->load('banks');
|
||||
|
||||
if ($status == self::STATUS_OPEN) {
|
||||
$label = $langs->trans("StatusAccountOpened");
|
||||
$labelshort = $langs->trans("StatusAccountOpened");
|
||||
$label = $langs->transnoentitiesnoconv("StatusAccountOpened");
|
||||
$labelshort = $langs->transnoentitiesnoconv("StatusAccountOpened");
|
||||
$statusType = 'status4';
|
||||
} else {
|
||||
$label = $langs->trans("StatusAccountClosed");
|
||||
$labelshort = $langs->trans("StatusAccountClosed");
|
||||
$label = $langs->transnoentitiesnoconv("StatusAccountClosed");
|
||||
$labelshort = $langs->transnoentitiesnoconv("StatusAccountClosed");
|
||||
$statusType = 'status5';
|
||||
}
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ $sql .= $object->getFieldList('t');
|
||||
// Add fields from extrafields
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key.', ' : '');
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
|
||||
}
|
||||
}
|
||||
// Add fields from hooks
|
||||
@ -578,7 +578,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($val['isameasure'])) {
|
||||
if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
|
||||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
|
||||
}
|
||||
|
||||
@ -378,10 +378,10 @@ class CashControl extends CommonObject
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelStatus[0] = $langs->trans('Draft');
|
||||
$this->labelStatus[1] = $langs->trans('Closed');
|
||||
$this->labelStatusShort[0] = $langs->trans('Draft');
|
||||
$this->labelStatusShort[1] = $langs->trans('Closed');
|
||||
$this->labelStatus[0] = $langs->transnoentitiesnoconv('Draft');
|
||||
$this->labelStatus[1] = $langs->transnoentitiesnoconv('Closed');
|
||||
$this->labelStatusShort[0] = $langs->transnoentitiesnoconv('Draft');
|
||||
$this->labelStatusShort[1] = $langs->transnoentitiesnoconv('Closed');
|
||||
}
|
||||
|
||||
$statusType = 'status0';
|
||||
|
||||
@ -3651,7 +3651,7 @@ if ($action == 'create') {
|
||||
}
|
||||
};
|
||||
|
||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
||||
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||
}
|
||||
|
||||
// Template to use by default
|
||||
@ -3857,6 +3857,15 @@ if ($action == 'create') {
|
||||
// $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
$resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT');
|
||||
|
||||
// Multicurrency
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
$multicurrency_totalpaye = $object->getSommePaiement(1);
|
||||
$multicurrency_totalcreditnotes = $object->getSumCreditNotesUsed(1);
|
||||
$multicurrency_totaldeposits = $object->getSumDepositsUsed(1);
|
||||
$multicurrency_resteapayer = price2num($object->multicurrency_total_ttc - $multicurrency_totalpaye - $multicurrency_totalcreditnotes - $multicurrency_totaldeposits, 'MT');
|
||||
$resteapayer = price2num($multicurrency_resteapayer / $object->multicurrency_tx, 'MT');
|
||||
}
|
||||
|
||||
if ($object->paye) {
|
||||
$resteapayer = 0;
|
||||
}
|
||||
|
||||
@ -303,8 +303,8 @@ class FactureRec extends CommonInvoice
|
||||
$sql .= ", ".((int) $facsrc->socid);
|
||||
$sql .= ", ".((int) $conf->entity);
|
||||
$sql .= ", '".$this->db->idate($now)."'";
|
||||
$sql .= ", ".(!empty($facsrc->amount) ? ((float) $facsrc->amount) : '0');
|
||||
$sql .= ", ".(!empty($facsrc->remise) ? ((float) $this->remise) : '0');
|
||||
$sql .= ", ".(!empty($facsrc->total_ttc) ? ((float) $facsrc->total_ttc) : '0');
|
||||
$sql .= ", ".(!empty($facsrc->remise_absolue) ? ((float) $this->remise_absolue) : '0');
|
||||
$sql .= ", ".(!empty($this->note_private) ? ("'".$this->db->escape($this->note_private)."'") : "NULL");
|
||||
$sql .= ", ".(!empty($this->note_public) ? ("'".$this->db->escape($this->note_public)."'") : "NULL");
|
||||
$sql .= ", ".(!empty($this->model_pdf) ? ("'".$this->db->escape($this->model_pdf)."'") : "NULL");
|
||||
@ -1461,56 +1461,55 @@ class FactureRec extends CommonInvoice
|
||||
global $langs;
|
||||
$langs->load('bills');
|
||||
|
||||
$labelStatus = $langs->trans('Active');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Active');
|
||||
$statusType = 'status0';
|
||||
|
||||
//print "$recur,$status,$mode,$alreadypaid,$type";
|
||||
if ($mode == 0) {
|
||||
$prefix = '';
|
||||
if ($recur) {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$labelStatus = $langs->trans('Active');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Active');
|
||||
}
|
||||
} else {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$labelStatus = $langs->trans("Draft");
|
||||
$labelStatus = $langs->transnoentitiesnoconv("Draft");
|
||||
}
|
||||
}
|
||||
} elseif ($mode == 1) {
|
||||
$prefix = 'Short';
|
||||
if ($recur) {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$labelStatus = $langs->trans('Active');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Active');
|
||||
}
|
||||
} else {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$labelStatus = $langs->trans("Draft");
|
||||
$labelStatus = $langs->transnoentitiesnoconv("Draft");
|
||||
}
|
||||
}
|
||||
} elseif ($mode == 2) {
|
||||
if ($recur) {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$statusType = 'status4';
|
||||
$labelStatus = $langs->trans('Active');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Active');
|
||||
}
|
||||
} else {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$statusType = 'status0';
|
||||
$labelStatus = $langs->trans('Draft');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Draft');
|
||||
}
|
||||
}
|
||||
} elseif ($mode == 3) {
|
||||
@ -1518,18 +1517,18 @@ class FactureRec extends CommonInvoice
|
||||
$prefix = 'Short';
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$statusType = 'status4';
|
||||
$labelStatus = $langs->trans('Active');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Active');
|
||||
}
|
||||
} else {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$statusType = 'status0';
|
||||
$labelStatus = $langs->trans('Draft');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Draft');
|
||||
}
|
||||
}
|
||||
} elseif ($mode == 4) {
|
||||
@ -1537,18 +1536,18 @@ class FactureRec extends CommonInvoice
|
||||
if ($recur) {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$statusType = 'status4';
|
||||
$labelStatus = $langs->trans('Active');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Active');
|
||||
}
|
||||
} else {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$statusType = 'status0';
|
||||
$labelStatus = $langs->trans('Draft');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Draft');
|
||||
}
|
||||
}
|
||||
} elseif ($mode == 5 || $mode == 6) {
|
||||
@ -1559,25 +1558,23 @@ class FactureRec extends CommonInvoice
|
||||
if ($recur) {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$statusType = 'status4';
|
||||
$labelStatus = $langs->trans('Active');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Active');
|
||||
}
|
||||
} else {
|
||||
if ($status == self::STATUS_SUSPENDED) {
|
||||
$statusType = 'status6';
|
||||
$labelStatus = $langs->trans('Disabled');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Disabled');
|
||||
} else {
|
||||
$statusType = 'status0';
|
||||
$labelStatus = $langs->trans('Draft');
|
||||
$labelStatus = $langs->transnoentitiesnoconv('Draft');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($labelStatusShort)) {
|
||||
$labelStatusShort = $labelStatus;
|
||||
}
|
||||
$labelStatusShort = $labelStatus;
|
||||
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
@ -110,6 +110,10 @@ if ($mode == 'supplier') {
|
||||
if ($object_status != '' && $object_status >= 0) {
|
||||
$stats->where .= ' AND f.fk_statut IN ('.$db->sanitize($object_status).')';
|
||||
}
|
||||
if (is_array($custcats) && !empty($custcats)) {
|
||||
$stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_fournisseur as cat ON (f.fk_soc = cat.fk_soc)';
|
||||
$stats->where .= ' AND cat.fk_categorie IN ('.$db->sanitize(implode(',', $custcats)).')';
|
||||
}
|
||||
}
|
||||
|
||||
// Build graphic number of object
|
||||
@ -119,10 +123,10 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear);
|
||||
|
||||
$filenamenb = $dir."/invoicesnbinyear-".$year.".png";
|
||||
if ($mode == 'customer') {
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png';
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png';
|
||||
}
|
||||
if ($mode == 'supplier') {
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicesnbinyear-'.$year.'.png';
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicesnbinyear-'.$year.'.png';
|
||||
}
|
||||
|
||||
$px1 = new DolGraph();
|
||||
|
||||
@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
print "<!-- BEGIN PHP TEMPLATE compta/facture/tpl/linkedopjectblock.tpl.php -->\n";
|
||||
|
||||
global $user;
|
||||
global $noMoreLinkedObjectBlockAfter;
|
||||
|
||||
@ -24,7 +24,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
}
|
||||
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
print "<!-- BEGIN PHP TEMPLATE compta/facture/tpl/linkedopjectblockForRec.tpl.php -->\n";
|
||||
|
||||
|
||||
global $user;
|
||||
|
||||
@ -64,7 +64,7 @@ if ($cancel && !$id) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($action == 'add' && $cancel) {
|
||||
if ($action == 'add' && !$cancel) {
|
||||
$db->begin();
|
||||
|
||||
$datev = dol_mktime(12, 0, 0, GETPOST("datevmonth"), GETPOST("datevday"), GETPOST("datevyear"));
|
||||
|
||||
@ -1005,10 +1005,10 @@ class RemiseCheque extends CommonObject
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||
global $langs;
|
||||
$langs->load('compta');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('ToValidate');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('ToValidate');
|
||||
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('ToValidate');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('ToValidate');
|
||||
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated');
|
||||
}
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
|
||||
@ -2346,16 +2346,16 @@ class BonPrelevement extends CommonObject
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('StatusWaiting');
|
||||
$this->labelStatus[self::STATUS_TRANSFERED] = $langs->trans('StatusTrans');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('StatusWaiting');
|
||||
$this->labelStatusShort[self::STATUS_TRANSFERED] = $langs->trans('StatusTrans');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('StatusWaiting');
|
||||
$this->labelStatus[self::STATUS_TRANSFERED] = $langs->transnoentitiesnoconv('StatusTrans');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('StatusWaiting');
|
||||
$this->labelStatusShort[self::STATUS_TRANSFERED] = $langs->transnoentitiesnoconv('StatusTrans');
|
||||
if ($this->type == 'bank-transfer') {
|
||||
$this->labelStatus[self::STATUS_DEBITED] = $langs->trans('StatusDebited');
|
||||
$this->labelStatusShort[self::STATUS_DEBITED] = $langs->trans('StatusDebited');
|
||||
$this->labelStatus[self::STATUS_DEBITED] = $langs->transnoentitiesnoconv('StatusDebited');
|
||||
$this->labelStatusShort[self::STATUS_DEBITED] = $langs->transnoentitiesnoconv('StatusDebited');
|
||||
} else {
|
||||
$this->labelStatus[self::STATUS_CREDITED] = $langs->trans('StatusCredited');
|
||||
$this->labelStatusShort[self::STATUS_CREDITED] = $langs->trans('StatusCredited');
|
||||
$this->labelStatus[self::STATUS_CREDITED] = $langs->transnoentitiesnoconv('StatusCredited');
|
||||
$this->labelStatusShort[self::STATUS_CREDITED] = $langs->transnoentitiesnoconv('StatusCredited');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -137,11 +137,11 @@ class LignePrelevement
|
||||
return $langs->trans($this->statuts[$status]);
|
||||
} elseif ($mode == 1) {
|
||||
if ($status == 0) {
|
||||
return img_picto($langs->trans($this->statuts[$status]), 'statut1', 'class="valignmiddle"').' '.$langs->trans($this->statuts[$status]); // Waiting
|
||||
return img_picto($langs->trans($this->statuts[$status]), 'statut1', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Waiting
|
||||
} elseif ($status == 2) {
|
||||
return img_picto($langs->trans($this->statuts[$status]), 'statut6', 'class="valignmiddle"').' '.$langs->trans($this->statuts[$status]); // Credited
|
||||
return img_picto($langs->trans($this->statuts[$status]), 'statut6', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Credited
|
||||
} elseif ($status == 3) {
|
||||
return img_picto($langs->trans($this->statuts[$status]), 'statut8', 'class="valignmiddle"').' '.$langs->trans($this->statuts[$status]); // Refused
|
||||
return img_picto($langs->trans($this->statuts[$status]), 'statut8', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Refused
|
||||
}
|
||||
} elseif ($mode == 2) {
|
||||
if ($status == 0) {
|
||||
@ -153,11 +153,11 @@ class LignePrelevement
|
||||
}
|
||||
} elseif ($mode == 3) {
|
||||
if ($status == 0) {
|
||||
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut1', 'class="valignmiddle"');
|
||||
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut1', 'class="valignmiddle"');
|
||||
} elseif ($status == 2) {
|
||||
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut6', 'class="valignmiddle"');
|
||||
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut6', 'class="valignmiddle"');
|
||||
} elseif ($status == 3) {
|
||||
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8', 'class="valignmiddle"');
|
||||
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut8', 'class="valignmiddle"');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -220,6 +220,9 @@ if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param.='&limit='.urlencode($limit);
|
||||
}
|
||||
$param = "&id=".urlencode($id);
|
||||
|
||||
// Lines of title fields
|
||||
|
||||
@ -525,15 +525,15 @@ class ChargeSociales extends CommonObject
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->trans('Unpaid');
|
||||
$this->labelStatus[self::STATUS_PAID] = $langs->trans('Paid');
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('Unpaid');
|
||||
$this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Paid');
|
||||
if ($status == self::STATUS_UNPAID && $alreadypaid > 0) {
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted");
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
|
||||
}
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('Unpaid');
|
||||
$this->labelStatusShort[self::STATUS_PAID] = $langs->trans('Paid');
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('Unpaid');
|
||||
$this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Paid');
|
||||
if ($status == self::STATUS_UNPAID && $alreadypaid > 0) {
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted");
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -866,15 +866,15 @@ class Tva extends CommonObject
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid');
|
||||
$this->labelStatus[self::STATUS_PAID] = $langs->trans('BillStatusPaid');
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid');
|
||||
$this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid');
|
||||
if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) {
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted");
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
|
||||
}
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid');
|
||||
$this->labelStatusShort[self::STATUS_PAID] = $langs->trans('BillStatusPaid');
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid');
|
||||
$this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid');
|
||||
if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) {
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted");
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1558,8 +1558,8 @@ class Contact extends CommonObject
|
||||
$statusType = 'status5';
|
||||
}
|
||||
|
||||
$label = $langs->trans($labelStatus[$status]);
|
||||
$labelshort = $langs->trans($labelStatusShort[$status]);
|
||||
$label = $langs->transnoentitiesnoconv($labelStatus[$status]);
|
||||
$labelshort = $langs->transnoentitiesnoconv($labelStatusShort[$status]);
|
||||
|
||||
return dolGetStatus($label, $labelshort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
@ -2545,7 +2545,7 @@ class Contrat extends CommonObject
|
||||
|
||||
if (!$error) {
|
||||
foreach ($this->lines as $line) {
|
||||
$result = $clonedObj->addline($line->desc, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit);
|
||||
$result = $clonedObj->addline($line->description, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
$this->error = $clonedObj->error;
|
||||
@ -2770,20 +2770,20 @@ class ContratLigne extends CommonObjectLine
|
||||
$langs->load("contracts");
|
||||
|
||||
if ($status == self::STATUS_INITIAL) {
|
||||
$labelStatus = $langs->trans("ServiceStatusInitial");
|
||||
$labelStatusShort = $langs->trans("ServiceStatusInitial");
|
||||
$labelStatus = $langs->transnoentities("ServiceStatusInitial");
|
||||
$labelStatusShort = $langs->transnoentities("ServiceStatusInitial");
|
||||
} elseif ($status == self::STATUS_OPEN && $expired == -1) {
|
||||
$labelStatus = $langs->trans("ServiceStatusRunning");
|
||||
$labelStatusShort = $langs->trans("ServiceStatusRunning");
|
||||
$labelStatus = $langs->transnoentities("ServiceStatusRunning");
|
||||
$labelStatusShort = $langs->transnoentities("ServiceStatusRunning");
|
||||
} elseif ($status == self::STATUS_OPEN && $expired == 0) {
|
||||
$labelStatus = $langs->trans("ServiceStatusNotLate");
|
||||
$labelStatusShort = $langs->trans("ServiceStatusNotLateShort");
|
||||
$labelStatus = $langs->transnoentities("ServiceStatusNotLate");
|
||||
$labelStatusShort = $langs->transnoentities("ServiceStatusNotLateShort");
|
||||
} elseif ($status == self::STATUS_OPEN && $expired == 1) {
|
||||
$labelStatus = $langs->trans("ServiceStatusLate");
|
||||
$labelStatusShort = $langs->trans("ServiceStatusLateShort");
|
||||
$labelStatus = $langs->transnoentities("ServiceStatusLate");
|
||||
$labelStatusShort = $langs->transnoentities("ServiceStatusLateShort");
|
||||
} elseif ($status == self::STATUS_CLOSED) {
|
||||
$labelStatus = $langs->trans("ServiceStatusClosed");
|
||||
$labelStatusShort = $langs->trans("ServiceStatusClosed");
|
||||
$labelStatus = $langs->transnoentities("ServiceStatusClosed");
|
||||
$labelStatusShort = $langs->transnoentities("ServiceStatusClosed");
|
||||
}
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
|
||||
@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
}
|
||||
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
print "<!-- BEGIN PHP TEMPLATE contrat/tpl/linkedopjectblock.tpl.php -->\n";
|
||||
|
||||
|
||||
global $user;
|
||||
|
||||
132
htdocs/core/ajax/onlineSign.php
Normal file
132
htdocs/core/ajax/onlineSign.php
Normal file
@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file /htdocs/core/ajax/onlineSign.php
|
||||
* \brief File to make Ajax action on Knowledge Management
|
||||
*/
|
||||
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
define('NOTOKENRENEWAL', '1'); // Disables token renewal
|
||||
}
|
||||
if (!defined('NOREQUIREHTML')) {
|
||||
define('NOREQUIREHTML', '1');
|
||||
}
|
||||
if (!defined('NOREQUIREAJAX')) {
|
||||
define('NOREQUIREAJAX', '1');
|
||||
}
|
||||
if (!defined('NOREQUIRESOC')) {
|
||||
define('NOREQUIRESOC', '1');
|
||||
}
|
||||
if (!defined('NOCSRFCHECK')) {
|
||||
define('NOCSRFCHECK', '1');
|
||||
}
|
||||
// Do not check anti CSRF attack test
|
||||
if (!defined('NOREQUIREMENU')) {
|
||||
define('NOREQUIREMENU', '1');
|
||||
}
|
||||
// If there is no need to load and show top and left menu
|
||||
if (!defined("NOLOGIN")) {
|
||||
define("NOLOGIN", '1');
|
||||
}
|
||||
if (!defined('NOIPCHECK')) {
|
||||
define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
||||
}
|
||||
if (!defined('NOBROWSERNOTIF')) {
|
||||
define('NOBROWSERNOTIF', '1');
|
||||
}
|
||||
include '../../main.inc.php';
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$signature = GETPOST('signaturebase64');
|
||||
$ref = GETPOST('ref', 'aZ09');
|
||||
$mode = GETPOST('mode', 'aZ09');
|
||||
$error = 0;
|
||||
$response = "";
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// None
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
if ($action == "importSignature") {
|
||||
if (!empty($signature) && $signature[0] == "image/png;base64") {
|
||||
$signature = $signature[1];
|
||||
$data = base64_decode($signature);
|
||||
$upload_dir = DOL_DATA_ROOT."/".$mode."/".$ref."/";
|
||||
$date = dol_print_date(dol_now(), "%Y%m%d%H%M%S");
|
||||
$filename = "signatures/".$date."_signature.png";
|
||||
if (!is_dir($upload_dir."signatures/")) {
|
||||
if (!mkdir($upload_dir."signatures/")) {
|
||||
$response ="error mkdir";
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if (!$error) {
|
||||
$return = file_put_contents($upload_dir.$filename, $data);
|
||||
if ($return == false) {
|
||||
$response = 'error file_put_content';
|
||||
} else {
|
||||
if ($mode == "propale") {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
$object = new Propal($db);
|
||||
$object->fetch(0, $ref);
|
||||
|
||||
$pdf = pdf_getInstance();
|
||||
$pdf->Open();
|
||||
$pdf->AddPage();
|
||||
$pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf");
|
||||
|
||||
$tppl = $pdf->importPage(1);
|
||||
$pdf->useTemplate($tppl);
|
||||
$pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15);
|
||||
$pdf->Close();
|
||||
$pdf->Output($upload_dir.$ref."_signed-".$date.".pdf", "F");
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
||||
$sql .= " SET fk_statut = ".((int) $object::STATUS_SIGNED).", note_private = '".$object->note_private."', date_signature='".$db->idate(dol_now())."'";
|
||||
$sql .= " WHERE rowid = ".((int) $object->id);
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
} else {
|
||||
$num = $db->affected_rows($resql);
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
$response = "success";
|
||||
setEventMessage("PropalSigned");
|
||||
} else {
|
||||
$db->rollback();
|
||||
$response = "error sql";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$response = 'error signature_not_found';
|
||||
}
|
||||
}
|
||||
echo $response;
|
||||
@ -162,7 +162,7 @@ class box_actions extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$line][2] = array(
|
||||
'td' => 'class="center nowraponall"',
|
||||
'text' => dol_print_date($datelimite, "dayhour", 'tzuserrel'),
|
||||
'text' => $datelimite ? dol_print_date($datelimite, "dayhour", 'tzuserrel') : '',
|
||||
'asis' => 1
|
||||
);
|
||||
|
||||
|
||||
@ -65,6 +65,8 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
|
||||
public function loadBox($max = 5)
|
||||
{
|
||||
global $conf, $user, $langs;
|
||||
$dataseries = "";
|
||||
$graphtoshow = "";
|
||||
|
||||
$badgeStatus0 = '#cbd3d3'; // draft
|
||||
$badgeStatus1 = '#bc9526'; // validated
|
||||
@ -85,7 +87,7 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
|
||||
|
||||
|
||||
$param_day = 'DOLUSERCOOKIE_ticket_last_days';
|
||||
if ($_POST[$param_day]) {
|
||||
if (!empty($_POST[$param_day])) {
|
||||
if ($_POST[$param_day] >= 15) {
|
||||
$days = 14;
|
||||
} else {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Module descriptor for ticket system
|
||||
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-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
|
||||
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file core/boxes/box_nb_ticket_last_x_days.php
|
||||
* \file htdocs/core/boxes/box_graph_new_vs_close_ticket.php
|
||||
* \ingroup ticket
|
||||
* \brief This box shows the number of new daily tickets the last X days
|
||||
*/
|
||||
@ -98,10 +98,10 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes
|
||||
$num = $this->db->num_rows($resql);
|
||||
if ($num > 0) {
|
||||
$objp = $this->db->fetch_object($resql);
|
||||
$data[] = array($langs->trans('TicketCreatedToday'), $objp->nb);
|
||||
$data[] = array($langs->transnoentitiesnoconv('TicketCreatedToday'), $objp->nb);
|
||||
$totalnb += $objp->nb;
|
||||
} else {
|
||||
$data[] = array($langs->trans('TicketCreatedToday'), 0);
|
||||
$data[] = array($langs->transnoentitiesnoconv('TicketCreatedToday'), 0);
|
||||
}
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
@ -116,10 +116,10 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes
|
||||
$num = $this->db->num_rows($resql);
|
||||
if ($num > 0) {
|
||||
$objp = $this->db->fetch_object($resql);
|
||||
$data[] = array($langs->trans('TicketClosedToday'), $objp->nb);
|
||||
$data[] = array($langs->transnoentitiesnoconv('TicketClosedToday'), $objp->nb);
|
||||
$totalnb += $objp->nb;
|
||||
} else {
|
||||
$data[] = array($langs->trans('TicketClosedToday'), 0);
|
||||
$data[] = array($langs->transnoentitiesnoconv('TicketClosedToday'), 0);
|
||||
}
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Module descriptor for ticket system
|
||||
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-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
|
||||
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file core/boxes/box_ticket_by_severity.php
|
||||
* \file htdocs/core/boxes/box_graph_ticket_by_severity.php
|
||||
* \ingroup ticket
|
||||
* \brief This box shows open tickets by severity
|
||||
*/
|
||||
|
||||
@ -97,6 +97,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
|
||||
}
|
||||
$sql .= " WHERE c.fk_soc = s.rowid";
|
||||
$sql .= " AND c.entity IN (".getEntity('supplier_order').")";
|
||||
$sql .= " AND c.date_livraison IS NOT NULL";
|
||||
$sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.")";
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) {
|
||||
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
|
||||
@ -161,7 +162,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right"',
|
||||
'text' => $delayIcon.'<span class="classfortooltip" title="'.$langs->trans('DateDeliveryPlanned').'"><i class="fa fa-dolly" ></i> '.dol_print_date($delivery_date, 'day', 'tzuserrel').'</span>',
|
||||
'text' => $delayIcon.'<span class="classfortooltip" title="'.$langs->trans('DateDeliveryPlanned').'"><i class="fa fa-dolly" ></i> '.($delivery_date ? dol_print_date($delivery_date, 'day', 'tzuserrel') : '').'</span>',
|
||||
'asis' => 1
|
||||
);
|
||||
|
||||
|
||||
@ -6488,7 +6488,7 @@ abstract class CommonObject
|
||||
|
||||
$out = '';
|
||||
$type = '';
|
||||
$isDependList=0;
|
||||
$isDependList = 0;
|
||||
$param = array();
|
||||
$param['options'] = array();
|
||||
$reg = array();
|
||||
@ -6796,7 +6796,7 @@ abstract class CommonObject
|
||||
|
||||
if (!empty($InfoFieldList[3]) && $parentField) {
|
||||
$parent = $parentName.':'.$obj->{$parentField};
|
||||
$isDependList=1;
|
||||
$isDependList = 1;
|
||||
}
|
||||
|
||||
$out .= '<option value="'.$obj->rowid.'"';
|
||||
@ -6951,7 +6951,7 @@ abstract class CommonObject
|
||||
|
||||
if (!empty($InfoFieldList[3]) && $parentField) {
|
||||
$parent = $parentName.':'.$obj->{$parentField};
|
||||
$isDependList=1;
|
||||
$isDependList = 1;
|
||||
}
|
||||
|
||||
$data[$obj->rowid] = $labeltoshow;
|
||||
@ -9056,10 +9056,15 @@ abstract class CommonObject
|
||||
$className = str_replace('@', '', $deleteFromObject[0]);
|
||||
$filePath = $deleteFromObject[1];
|
||||
$columnName = $deleteFromObject[2];
|
||||
$TMoreSQL = array();
|
||||
$more_sql = $deleteFromObject[3];
|
||||
if (!empty($more_sql)) {
|
||||
$TMoreSQL['customsql'] = $more_sql;
|
||||
}
|
||||
if (dol_include_once($filePath)) {
|
||||
$childObject = new $className($this->db);
|
||||
if (method_exists($childObject, 'deleteByParentField')) {
|
||||
$result = $childObject->deleteByParentField($this->id, $columnName);
|
||||
$result = $childObject->deleteByParentField($this->id, $columnName, $TMoreSQL);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
$this->errors[] = $childObject->error;
|
||||
@ -9141,10 +9146,12 @@ abstract class CommonObject
|
||||
*
|
||||
* @param int $parentId Parent Id
|
||||
* @param string $parentField Name of Foreign key parent column
|
||||
* @param array $filter an array filter
|
||||
* @param string $filtermode AND or OR
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @throws Exception
|
||||
*/
|
||||
public function deleteByParentField($parentId = 0, $parentField = '')
|
||||
public function deleteByParentField($parentId = 0, $parentField = '', $filter = array(), $filtermode = "AND")
|
||||
{
|
||||
global $user;
|
||||
|
||||
@ -9157,6 +9164,23 @@ abstract class CommonObject
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= " WHERE ".$parentField." = ".(int) $parentId;
|
||||
|
||||
// Manage filters
|
||||
$sqlwhere = array();
|
||||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 'customsql') {
|
||||
$sqlwhere[] = $value;
|
||||
} elseif (strpos($value, '%') === false) {
|
||||
$sqlwhere[] = $key." IN (".$this->db->sanitize($this->db->escape($value)).")";
|
||||
} else {
|
||||
$sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= " AND (".implode(" ".$filtermode." ", $sqlwhere).")";
|
||||
}
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$this->errors[] = $this->db->lasterror();
|
||||
@ -9461,7 +9485,7 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
$ok=0;
|
||||
$ok = 0;
|
||||
|
||||
// Process
|
||||
foreach ($to_del as $del) {
|
||||
@ -9473,7 +9497,7 @@ abstract class CommonObject
|
||||
$this->errors = $c->errors;
|
||||
break;
|
||||
} else {
|
||||
$ok+=$result;
|
||||
$ok += $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9486,7 +9510,7 @@ abstract class CommonObject
|
||||
$this->errors = $c->errors;
|
||||
break;
|
||||
} else {
|
||||
$ok+=$result;
|
||||
$ok += $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,6 +51,11 @@ abstract class CommonObjectLine extends CommonObject
|
||||
*/
|
||||
public $fk_unit;
|
||||
|
||||
public $date_debut_prevue;
|
||||
public $date_debut_reel;
|
||||
public $date_fin_prevue;
|
||||
public $date_fin_reel;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -106,4 +111,20 @@ abstract class CommonObjectLine extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty function to prevent errors on call of this function must be overload if usefull
|
||||
*
|
||||
* @param string $sortorder Sort Order
|
||||
* @param string $sortfield Sort field
|
||||
* @param int $limit offset limit
|
||||
* @param int $offset offset limit
|
||||
* @param array $filter filter array
|
||||
* @param string $filtermode filter mode (AND or OR)
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user