180
ChangeLog
@ -6,9 +6,184 @@ English Dolibarr ChangeLog
|
|||||||
***** ChangeLog for 11.0.0 compared to 10.0.0 *****
|
***** ChangeLog for 11.0.0 compared to 10.0.0 *****
|
||||||
For Users:
|
For Users:
|
||||||
|
|
||||||
|
NEW: Module BOM is now stable (Module MO - Manufacturing Order is still in development).
|
||||||
|
NEW: A nicer dashboard for opened elements on Home page.
|
||||||
|
NEW: Add task widget and add task progress bar
|
||||||
|
NEW: Accountancy - Can add specific widget in this accountancy area.
|
||||||
|
NEW: Accountancy - Add export model LDCompta V9 & higher
|
||||||
|
NEW: Accountancy - Add permission on export, delete operations in ledger
|
||||||
|
NEW: Add 2 hidden options to set the default sorting (sort and order) on document page.
|
||||||
|
NEW: add ability to edit price without tax before adding a line of a predefined product.
|
||||||
|
NEW: Add a tab to setup "Opening hours" of company (information only).
|
||||||
|
NEW: Add attendee to ical export + cleanup.
|
||||||
|
NEW: Add bank data of users into the expense report exports.
|
||||||
|
NEW: add clone customers prices in clone product or service.
|
||||||
|
NEW: Add column of module source and POS terminal in the invoice list.
|
||||||
|
NEW: Add column last modification date into the table of targets for emailing.
|
||||||
|
NEW: Add column VAT rate in product list
|
||||||
|
NEW: add constant DISPATCH_FORCE_QTY_INPUT
|
||||||
|
NEW: Add constant MAIN_DISABLE_GLOBAL_WORKBOARD to disable workboard in home page
|
||||||
|
NEW: add country code in import product model
|
||||||
|
NEW: Add 'Direct Cash Payment' button in TakePOS
|
||||||
|
NEW: Add odt support to supplier orders
|
||||||
|
NEW: Add experimental SumUp payment to TakePOS (need to set a hidden constant)
|
||||||
|
NEW: Add feature to search a string into website containers
|
||||||
|
NEW: Add GET and POST /supplierinvoices/payments REST API endpoints.
|
||||||
|
NEW: Show progress bar for declared progression of tasks.
|
||||||
|
NEW: Add hidden option to update supplier buying price during receptions.
|
||||||
|
NEW: Add hidden option PROPOSAL_SHOW_INVOICED_AMOUNT (not reliable if one invoice is done on several order or several proposal)
|
||||||
|
NEW: Add hidden option SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT for add possibility to update supplier buying price in the reception on a supplier order
|
||||||
|
NEW: Add hidden option THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER to copy extrafields from third party to order.
|
||||||
|
NEW: Add hidden options to send by email even for object with draft status.
|
||||||
|
NEW: Add last change date in page "Other setup". Can sort page on name/date.
|
||||||
|
NEW: Add link to export targets of an emailings into a CSV file.
|
||||||
|
NEW: Add link to the public interface on the ticket card.
|
||||||
|
NEW: Add location into event tooltip. Use full day for fullday events
|
||||||
|
NEW: add MAIN_LANGUAGES_ALLOWED constant to limit languages displayed.
|
||||||
|
NEW: add MAIN_SHOW_COMPANY_NAME_IN_BANNER_ADDRESS constant.
|
||||||
|
NEW: add mass actions in shipment list.
|
||||||
|
NEW: add minimum stock filter in load warehoues for product form.
|
||||||
|
NEW: add name_alias in fields to search all
|
||||||
|
NEW: add new rule fetchidfromcodeandlabel for categories import
|
||||||
|
NEW: add office phone for salespresentatives
|
||||||
|
NEW: add office phone & job on user tooltips
|
||||||
|
NEW: Add option MAIN_PDF_FORCE_FONT_SIZE
|
||||||
|
NEW: Add option MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS
|
||||||
|
NEW: Add option multiselect for developers on the selector of language.
|
||||||
|
NEW: Add option WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_PROPOSAL
|
||||||
|
NEW: Add pagination on list of object of a category
|
||||||
|
NEW: add parent category id or label in import category module
|
||||||
|
NEW: add parent id or ref column in warehouse import
|
||||||
|
NEW: Can set the Address/Contact by default on third parties.
|
||||||
|
NEW: Add search into template
|
||||||
|
NEW: Add shipment widget
|
||||||
|
NEW: add socialnetworks dictionary
|
||||||
|
NEW: Add statistics on product into contracts
|
||||||
|
NEW: Add status of warehouse in tooltip of a warehouse.
|
||||||
|
NEW: add supplier's product list
|
||||||
|
NEW: add units fields in buying price tab of product card
|
||||||
|
NEW: Add units in select products lines
|
||||||
|
NEW: Add upload document on account statement
|
||||||
|
NEW: Add widgets for BOMs and MOs
|
||||||
|
NEW: Amount invoiced column in proposal list
|
||||||
|
NEW: Ask the new label and new dates in confirm popup when cloning tax
|
||||||
|
NEW: auto set closing date and user on invoice
|
||||||
|
NEW: Avoid wrap between picto and text on getNomUrl
|
||||||
|
NEW: Balance Stripe connect account for supplier
|
||||||
|
NEW: Bank Add an option for colorize background color of debit or credit movement
|
||||||
|
NEW: Beautify the select box of warehouses
|
||||||
|
NEW: birthday widget for member
|
||||||
|
NEW: Widgets uses fiscal year
|
||||||
|
NEW: Can change supplier when cloning a Purchase Order
|
||||||
|
NEW: can choose lines while creating order from origin
|
||||||
|
NEW: Can crop/resize image attached on a bank record
|
||||||
|
NEW: Can defined a position of numbering submodules for thirdparties
|
||||||
|
NEW: Can edit date or RUM mandate.
|
||||||
|
NEW: Can edit link to the translation page in website module
|
||||||
|
NEW: Can edit the price of predefined product during adding in documents
|
||||||
|
NEW: Can enter price tax incl on vendor proposal and purchase orders
|
||||||
|
NEW: Can filter on description on bank account transaction lists.
|
||||||
|
NEW: Can filter on label on invoice in accounting vendor binding pages
|
||||||
|
NEW: Can load multilang translation in same step than fetch_lines
|
||||||
|
NEW: Can restrict access using DAV module to some host IPs only
|
||||||
|
NEW: Can restrict API usage to some IP only
|
||||||
|
NEW: Can select website templates from available default templates with a preview.
|
||||||
|
NEW: Can set a filter on object linked in modulebuilder.
|
||||||
|
NEW: Can set a squarred icon on your company setup
|
||||||
|
NEW: can specify hour start end for selectDate and step for minutes
|
||||||
|
NEW: Categories/Tags are also available on warehouses
|
||||||
|
NEW: Check if a resource is in use in an event
|
||||||
|
NEW: Code for extrafields uses the new array $extrafields->attributes
|
||||||
|
NEW: Compute column value from others columns in import module
|
||||||
|
NEW: Copy linked categories on product clone process.
|
||||||
|
NEW: Default for Stripe is STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION
|
||||||
|
NEW: Digitaria model for numbering accountancy thirdparty
|
||||||
|
NEW: Display membership in takepos if member linked to the thirdparty
|
||||||
|
NEW: Display supplier in objectline if defined
|
||||||
|
NEW: Add default duration of subscriptions on members type
|
||||||
|
NEW: Email template for Takepos (to send invoice)
|
||||||
|
NEW: Expense request and holiday validator fields
|
||||||
|
NEW: Export ledger table in Charlemagne format
|
||||||
|
NEW: Export livre Charlemagne
|
||||||
|
NEW: Extend option ORDER_ADD_ORDERS_WITH_PARENT_PROD_IF_INCDEC for all virtual product stats (renamed into PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)
|
||||||
|
NEW: FCKeditor setup for tickets
|
||||||
|
NEW: GeoIP v2 support is natively provided -> So IPv6 is supported
|
||||||
|
NEW: List by closing date on order list and proposal list
|
||||||
|
NEW: Look and feel v11: Some setup pages are by default direclty in edit mode.
|
||||||
|
NEW: Management of retained warranty on situation invoices
|
||||||
|
NEW: Mass email action on invoice list use billing contact if exists
|
||||||
|
NEW: more living colors for charts and option for "color bind" people
|
||||||
|
NEW: Supports multiple payments in a TakePOS sale
|
||||||
|
NEW: multiselect with checkbox in categories/tags search for product list
|
||||||
|
NEW: Option to allow to create members from third-party
|
||||||
|
NEW: Platform compliance with Stripe Connect
|
||||||
|
NEW: print / send email form in TakePOS
|
||||||
|
NEW: Public holidays are now in a dictionary table (no more hard coded per country)
|
||||||
|
NEW: Better performance by reducing the $companystatic calls on some pages.
|
||||||
|
NEW: Replace the "info" tab on contract with the more complete "agenda" tab.
|
||||||
|
NEW: Save user of last modification in donation record.
|
||||||
|
NEW: Show html combo list instead input text for extrafields typed as list.
|
||||||
|
NEW: Show POS application and the terminal used on invoice card.
|
||||||
|
NEW: Add categories/tags for stocks.
|
||||||
|
NEW: Support Net Measure in product's card.php
|
||||||
|
NEW: Extrafields separator can be collapsed or not
|
||||||
|
NEW: Extrafields support on Leave requests.
|
||||||
|
NEW: Extrafields support on Salaries.
|
||||||
|
NEW: Extrafields support in Product supplier prices.
|
||||||
|
NEW: Add extrafields for warehouses
|
||||||
|
NEW: Add extrafields in export of expense report (and holiday)
|
||||||
|
NEW: The integrity checker now show also the expected size of files.
|
||||||
|
NEW: The order method in purchase order is now mandatory when recording an order.
|
||||||
|
NEW: update / delete stripe account for supplier
|
||||||
|
NEW: Use the gender of member for picto in member lists.
|
||||||
|
NEW: Use the squarre logo as favicon of pages
|
||||||
|
NEW: VAT list - Add date start & date end in filters
|
||||||
|
NEW: widget box for supplier orders awaiting reception
|
||||||
|
NEW: Update translations
|
||||||
|
NEW: #4301
|
||||||
|
|
||||||
For Developers:
|
For Developers or integrators:
|
||||||
|
|
||||||
|
NEW: Add a manifest.json.php file for web app.
|
||||||
|
NEW: Removed deprecated code that create linked object from ->origin
|
||||||
|
NEW: experimental zapier for dolibarr
|
||||||
|
NEW: Accountancy - Add hook bookkeepinglist on general ledger
|
||||||
|
NEW: Can update product type with the update method.
|
||||||
|
NEW: add API shipment mode dictionnary
|
||||||
|
NEW: Add API to get Country by code and iso
|
||||||
|
NEW: Add API to get objects by ref, ref_ext, ...
|
||||||
|
NEW: Add anonymous telemetry
|
||||||
|
NEW: Add a category to a contact in API
|
||||||
|
NEW: Add fk projet on stock movement
|
||||||
|
NEW: Add hidden option to set fields for the quick search on products.
|
||||||
|
NEW: add hook on commongeneratedocument
|
||||||
|
NEW: Add hook on fileupload.class.php to enable modules to override…
|
||||||
|
NEW: Add hooks on index pages
|
||||||
|
NEW: adding 'formObjectOptions' hooks loading at card.php of adherents module
|
||||||
|
NEW: Add method getStructuredData for website
|
||||||
|
NEW: Add payments GET and POST REST API endpoints for supplierinvoices.
|
||||||
|
NEW: Add POST /bankaccounts/transfer REST API endpoint.
|
||||||
|
NEW: add "printBucktrackInfo" hook, an external module can add info
|
||||||
|
NEW: Add trigger DIRECT_DEBIT_ORDER_CREATE on widthdraw is missing
|
||||||
|
NEW: API to post documents for "product" and Delete document
|
||||||
|
NEW: add new function "setEntity()" and better compatibility with Multicompany
|
||||||
|
NEW: Can add a button "Create" after combo of object with modulebuilder.
|
||||||
|
NEW: contacts type dictionnary in api_setup.class.php
|
||||||
|
NEW: Look and feel v11: Introduce CSS "trforbreak"
|
||||||
|
NEW: list of measuring units API
|
||||||
|
NEW: get social networks dictionary by API
|
||||||
|
NEW: Get thirdparty's salesrepresentatives by API
|
||||||
|
NEW: get user connected informations in REST API
|
||||||
|
NEW: mode for list thirdparty API (add easy filter for supplier only)
|
||||||
|
NEW: purchase_prices API
|
||||||
|
NEW: Provides more complete demo data
|
||||||
|
NEW: Module builder can generate CSS of JS file.
|
||||||
|
NEW: Use a dedicated css for the pencil to edit a field.
|
||||||
|
NEW: multilangs in fetch_lines
|
||||||
|
NEW: Add more complete info for triggers actioncom
|
||||||
|
NEW: add multicurrency rate at currency list API
|
||||||
|
NEW: Update jquery library to 3.4.1
|
||||||
|
NEW: Upgrade ACE editor to v1.4.6
|
||||||
|
|
||||||
WARNING:
|
WARNING:
|
||||||
|
|
||||||
@ -29,6 +204,9 @@ Following changes may create regressions for some external modules, but were nec
|
|||||||
* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
|
* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
|
||||||
* All properties 'type_libelle' were renamed into 'type_label'.
|
* All properties 'type_libelle' were renamed into 'type_label'.
|
||||||
* Renamed property of thirdparty "statut_commercial" into "status_prospect_label"
|
* Renamed property of thirdparty "statut_commercial" into "status_prospect_label"
|
||||||
|
* The jquery plugin/dependency multiselect has been removed. It was not used by Dolibarr core.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 10.0.3 compared to 10.0.2 *****
|
***** ChangeLog for 10.0.3 compared to 10.0.2 *****
|
||||||
IMPORTANT : This version fixes a serious bug in saving the units of weight, size, surface and volume on product card.
|
IMPORTANT : This version fixes a serious bug in saving the units of weight, size, surface and volume on product card.
|
||||||
|
|||||||
BIN
dev/initdemo/documents_demo/categorie/2/3/32/photos/Fruits.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
BIN
dev/initdemo/documents_demo/categorie/4/3/34/photos/Pies.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
BIN
dev/initdemo/documents_demo/categorie/5/3/35/photos/Other.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
BIN
dev/initdemo/documents_demo/produit/POS-CAR/FR-CAR-Carrot.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
BIN
dev/initdemo/documents_demo/produit/POS-Eggs/POS-Eggs-Eggs.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
BIN
dev/initdemo/documents_demo/produit/POS-KIWI/POS-KIWI-Kiwi.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("accountancy"));
|
$langs->loadLangs(array("accountancy"));
|
||||||
|
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page", 'int');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
|||||||
@ -575,8 +575,8 @@ if ($action == 'delmouv') {
|
|||||||
}
|
}
|
||||||
if ($action == 'delbookkeepingyear') {
|
if ($action == 'delbookkeepingyear') {
|
||||||
$form_question = array();
|
$form_question = array();
|
||||||
$delyear = GETPOST('delyear');
|
$delyear = GETPOST('delyear', 'int');
|
||||||
$deljournal = GETPOST('deljournal');
|
$deljournal = GETPOST('deljournal', 'alpha');
|
||||||
|
|
||||||
if (empty($delyear)) {
|
if (empty($delyear)) {
|
||||||
$delyear = dol_print_date(dol_now(), '%Y');
|
$delyear = dol_print_date(dol_now(), '%Y');
|
||||||
|
|||||||
@ -75,7 +75,7 @@ if (empty($action) && empty($id) && empty($ref)) $action = 'view';
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
//if ($user->socid > 0) access_forbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$isdraft = (($object->statut == MyObject::STATUS_DRAFT) ? 1 : 0);
|
//$isdraft = (($object->statut == MyObject::STATUS_DRAFT) ? 1 : 0);
|
||||||
//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||||
@ -418,11 +418,26 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
if (function_exists('imap_open'))
|
if (function_exists('imap_open'))
|
||||||
{
|
{
|
||||||
$connectstringserver = $object->getConnectStringIMAP();
|
$connectstringserver = $object->getConnectStringIMAP();
|
||||||
$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);
|
|
||||||
$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir);
|
try {
|
||||||
|
if ($sourcedir) {
|
||||||
|
//$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);
|
||||||
|
$connectstringsource = $connectstringserver.$object->getEncodedUtf7($sourcedir);
|
||||||
|
}
|
||||||
|
if ($targetdir) {
|
||||||
|
//$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir);
|
||||||
|
$connectstringtarget = $connectstringserver.$object->getEncodedUtf7($targetdir);
|
||||||
|
}
|
||||||
|
|
||||||
$connection = imap_open($connectstringsource, $object->login, $object->password);
|
$connection = imap_open($connectstringsource, $object->login, $object->password);
|
||||||
}
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
print $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$morehtml .= $form->textwithpicto('', 'connect string '.$connectstringserver);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$morehtml .= 'IMAP functions not available on your PHP';
|
$morehtml .= 'IMAP functions not available on your PHP';
|
||||||
@ -509,11 +524,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
else { jQuery("#rulevalue").prop("disabled", false); }
|
else { jQuery("#rulevalue").prop("disabled", false); }
|
||||||
jQuery("#rulevalue").attr("placeholder", (jQuery("#filtertype option:selected").attr("data-placeholder")));
|
jQuery("#rulevalue").attr("placeholder", (jQuery("#filtertype option:selected").attr("data-placeholder")));
|
||||||
';
|
';
|
||||||
$noparam = array();
|
/*$noparam = array();
|
||||||
foreach ($arrayoftypes as $key => $value)
|
foreach ($arrayoftypes as $key => $value)
|
||||||
{
|
{
|
||||||
if ($value['noparam']) $noparam[] = $key;
|
if ($value['noparam']) $noparam[] = $key;
|
||||||
}
|
}*/
|
||||||
print '})';
|
print '})';
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2012 Mikael Carlavan <contact@mika-carl.fr>
|
/* Copyright (C) 2012 Mikael Carlavan <contact@mika-carl.fr>
|
||||||
* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||||
* Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
|
* Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -44,8 +44,8 @@ $action = GETPOST('action', 'alpha');
|
|||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
|
|
||||||
$apply_to = GETPOST('apply_to');
|
$apply_to = GETPOST('apply_to');
|
||||||
$fk_user = GETPOST('fk_user');
|
$fk_user = GETPOST('fk_user', 'int');
|
||||||
$fk_usergroup = GETPOST('fk_usergroup');
|
$fk_usergroup = GETPOST('fk_usergroup', 'int');
|
||||||
|
|
||||||
$fk_c_type_fees = GETPOST('fk_c_type_fees');
|
$fk_c_type_fees = GETPOST('fk_c_type_fees');
|
||||||
$code_expense_rules_type = GETPOST('code_expense_rules_type');
|
$code_expense_rules_type = GETPOST('code_expense_rules_type');
|
||||||
@ -97,11 +97,11 @@ if ($action == 'save')
|
|||||||
$object->setValues($_POST);
|
$object->setValues($_POST);
|
||||||
|
|
||||||
if ($apply_to == 'U') {
|
if ($apply_to == 'U') {
|
||||||
$object->fk_user=$fk_user;
|
$object->fk_user = (int) $fk_user;
|
||||||
$object->fk_usergroup = 0;
|
$object->fk_usergroup = 0;
|
||||||
$object->is_for_all = 0;
|
$object->is_for_all = 0;
|
||||||
}elseif ($apply_to == 'G') {
|
}elseif ($apply_to == 'G') {
|
||||||
$object->fk_usergroup=$fk_usergroup;
|
$object->fk_usergroup = (int) $fk_usergroup;
|
||||||
$object->fk_user = 0;
|
$object->fk_user = 0;
|
||||||
$object->is_for_all = 0;
|
$object->is_for_all = 0;
|
||||||
}elseif ($apply_to == 'A') {
|
}elseif ($apply_to == 'A') {
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $type='contract';
|
|||||||
|
|
||||||
if (empty($conf->global->HOLIDAY_ADDON))
|
if (empty($conf->global->HOLIDAY_ADDON))
|
||||||
{
|
{
|
||||||
$conf->global->HOLIDAY_ADDON='mod_holiday_madona';
|
$conf->global->HOLIDAY_ADDON = 'mod_holiday_madonna';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -67,9 +67,12 @@ if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<span class="opacitymedium">';
|
||||||
print $langs->trans("SetupDescription1");
|
print $langs->trans("SetupDescription1");
|
||||||
print $langs->trans("AreaForAdminOnly").' ';
|
print $langs->trans("AreaForAdminOnly").' ';
|
||||||
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"))."<br><br>";
|
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"));
|
||||||
|
print '</span>';
|
||||||
|
print "<br><br>";
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -315,7 +315,7 @@ if ($action == 'edit')
|
|||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
|
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
|
||||||
{
|
{
|
||||||
print '<input class="flat" id="MAIN_MAIL_SMTP_SERVER" name="MAIN_MAIL_SMTP_SERVER" size="18" value="' . $mainserver . '">';
|
print '<input class="flat" id="MAIN_MAIL_SMTP_SERVER" name="MAIN_MAIL_SMTP_SERVER" size="18" value="'.$mainserver.'" autocomplete="off">';
|
||||||
print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_sav" name="MAIN_MAIL_SMTP_SERVER_sav" value="'.$mainserver.'">';
|
print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_sav" name="MAIN_MAIL_SMTP_SERVER_sav" value="'.$mainserver.'">';
|
||||||
print '<span id="smtp_server_mess" class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
|
print '<span id="smtp_server_mess" class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
|
||||||
}
|
}
|
||||||
@ -384,11 +384,13 @@ if ($action == 'edit')
|
|||||||
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))))
|
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))))
|
||||||
{
|
{
|
||||||
$mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW) ? $conf->global->MAIN_MAIL_SMTPS_PW : '');
|
$mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW) ? $conf->global->MAIN_MAIL_SMTPS_PW : '');
|
||||||
print '<tr class="drag drop oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>';
|
print '<tr class="drag drop oddeven"><td>';
|
||||||
|
print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_PW"), $langs->trans("WithGMailYouCanCreateADedicatedPassword"));
|
||||||
|
print '</td><td>';
|
||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
|
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
|
||||||
{
|
{
|
||||||
print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW" size="32" value="' . $mainsmtppw . '">';
|
print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW" size="32" value="'.$mainsmtppw.'" autocomplete="off">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -135,6 +135,10 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
|||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
|
// Actions cancel, add, update, delete or clone
|
||||||
|
$backurlforlist = $_SERVER["PHP_SELF"].'?action=list';
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
||||||
|
|
||||||
// Selection of new fields
|
// Selection of new fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
@ -344,7 +348,7 @@ print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'"
|
|||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="'.($action == 'create' ? 'add' : 'list').'">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
@ -354,7 +358,7 @@ $newcardbutton = '';
|
|||||||
if ($action != 'create') {
|
if ($action != 'create') {
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER['PHP_SELF'].'?action=create', '', $permissiontoadd);
|
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER['PHP_SELF'].'?action=create', '', $permissiontoadd);
|
||||||
} else {
|
} else {
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
/*print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
@ -362,13 +366,18 @@ if ($action != 'create') {
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
*/
|
||||||
print '<table class="border centpercent tableforfield">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="label" value="'.GETPOST('label', 'alphanohtml').'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="label" value="'.GETPOST('label', 'alphanohtml').'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Email").'</td><td><input type="text" name="email" value="'.GETPOST('email', 'alphanohtml').'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Email").'</td><td><input type="text" name="email" value="'.GETPOST('email', 'alphanohtml').'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Signature").'</td><td><textarea name="signature">'.GETPOST('signature', 'none').'</textarea></td></tr>';
|
print '<tr><td>'.$langs->trans("Signature").'</td><td>';
|
||||||
print '<tr><td>'.$langs->trans("Position").'</td><td><input type="text" name="label" class="maxwidth50" value="'.GETPOST('position', 'int').'"></td></tr>';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
|
$doleditor = new DolEditor('signature', GETPOST('signature'), '', 138, 'dolibarr_notes', 'In', true, true, empty($conf->global->FCKEDITOR_ENABLE_USERSIGN) ? 0 : 1, ROWS_4, '90%');
|
||||||
|
print $doleditor->Create(1);
|
||||||
|
print '</td></tr>';
|
||||||
|
print '<tr><td>'.$langs->trans("Position").'</td><td><input type="text" name="position" class="maxwidth50" value="'.GETPOST('position', 'int').'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
||||||
print '<input type="text" name="status" value="'.GETPOST('status', 'int').'">';
|
print $form->selectyesno('active', GETPOST('active', 'int'), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -377,7 +386,7 @@ if ($action != 'create') {
|
|||||||
print ' ';
|
print ' ';
|
||||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</form>';
|
//print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit);
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit);
|
||||||
|
|||||||
@ -42,11 +42,11 @@ print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$lan
|
|||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
// Recupere l'OS au sens PHP
|
// Recupere l'OS au sens PHP
|
||||||
print "<tr $bc[0]><td width=\"240\">".$langs->trans("PHP_OS")."</td><td>".PHP_OS."</td></tr>\n";
|
print '<tr class="oddeven"><td>'.$langs->trans("PHP_OS")."</td><td>".PHP_OS."</td></tr>\n";
|
||||||
|
|
||||||
// Recupere la version de l'OS
|
// Recupere la version de l'OS
|
||||||
$osversion=version_os();
|
$osversion=version_os();
|
||||||
print "<tr $bc[1]><td width=\"240\">".$langs->trans("Version")."</td><td>".$osversion."</td></tr>\n";
|
print '<tr class="oddeven"><td>'.$langs->trans("Version")."</td><td>".$osversion."</td></tr>\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -1327,6 +1327,20 @@ class Setup extends DolibarrApi
|
|||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get properties of company
|
||||||
|
*
|
||||||
|
* @url GET /company
|
||||||
|
*
|
||||||
|
* @return array|mixed Data without useless information
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function getCompany()
|
||||||
|
{
|
||||||
|
global $mysoc;
|
||||||
|
|
||||||
|
return $this->_cleanObjectDatas($mysoc);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do a test of integrity for files and setup.
|
* Do a test of integrity for files and setup.
|
||||||
|
|||||||
@ -60,7 +60,7 @@ foreach ($object->fields as $key => $val)
|
|||||||
if (empty($action) && empty($id) && empty($ref)) $action = 'view';
|
if (empty($action) && empty($id) && empty($ref)) $action = 'view';
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
//if ($user->socid > 0) access_forbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$result = restrictedArea($user, 'asset', $id);
|
//$result = restrictedArea($user, 'asset', $id);
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'))
|
|||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
//if ($user->socid > 0) access_forbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$result = restrictedArea($user, 'asset', $id);
|
//$result = restrictedArea($user, 'asset', $id);
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ $hookmanager->initHooks(array('assetnote')); // Note that conf->hooks_modules co
|
|||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
//if ($user->socid > 0) access_forbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$result = restrictedArea($user, 'asset', $id);
|
//$result = restrictedArea($user, 'asset', $id);
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ else
|
|||||||
$search_agenda_label = GETPOST('search_agenda_label');
|
$search_agenda_label = GETPOST('search_agenda_label');
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
//if ($user->socid > 0) access_forbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$result = restrictedArea($user, 'bom', $id);
|
//$result = restrictedArea($user, 'bom', $id);
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ if (empty($action) && empty($id) && empty($ref)) $action = 'view';
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
//if ($user->socid > 0) access_forbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
|
//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
//$result = restrictedArea($user, 'bom', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
//$result = restrictedArea($user, 'bom', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||||
@ -693,7 +693,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||||
$genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content
|
$genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content
|
||||||
$delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card
|
$delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card
|
||||||
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang);
|
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
|
||||||
|
|
||||||
// Show links to link elements
|
// Show links to link elements
|
||||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('bom'));
|
$linktoelem = $form->showLinkToObjectBlock($object, null, array('bom'));
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'))
|
|||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
//if ($user->socid > 0) access_forbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$result = restrictedArea($user, 'bom', $id);
|
//$result = restrictedArea($user, 'bom', $id);
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ $hookmanager->initHooks(array('bomnote', 'globalcard')); // Note that conf->hook
|
|||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
//if ($user->socid > 0) access_forbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$result = restrictedArea($user, 'bom', $id);
|
//$result = restrictedArea($user, 'bom', $id);
|
||||||
|
|
||||||
|
|||||||
@ -1146,11 +1146,13 @@ class Categorie extends CommonObject
|
|||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel.
|
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel.
|
||||||
|
* It is called by get_full_arbo()
|
||||||
* This function is a memory scan only from $this->cats and $this->motherof, no database access must be done here.
|
* This function is a memory scan only from $this->cats and $this->motherof, no database access must be done here.
|
||||||
*
|
*
|
||||||
* @param int $id_categ id_categ entry to update
|
* @param int $id_categ id_categ entry to update
|
||||||
* @param int $protection Deep counter to avoid infinite loop
|
* @param int $protection Deep counter to avoid infinite loop
|
||||||
* @return void
|
* @return void
|
||||||
|
* @see get_full_arbo()
|
||||||
*/
|
*/
|
||||||
public function build_path_from_id_categ($id_categ, $protection = 1000)
|
public function build_path_from_id_categ($id_categ, $protection = 1000)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -167,7 +167,7 @@ if ($object->id)
|
|||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1437,7 +1437,7 @@ if ($id > 0)
|
|||||||
// related contact
|
// related contact
|
||||||
print '<tr><td>'.$langs->trans("ActionOnContact").'</td><td>';
|
print '<tr><td>'.$langs->trans("ActionOnContact").'</td><td>';
|
||||||
print '<div class="maxwidth200onsmartphone">';
|
print '<div class="maxwidth200onsmartphone">';
|
||||||
print $form->selectcontacts($object->socid, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 0, 'quatrevingtpercent', false, 0, 0, array(), 'multiple', 'contactid');
|
print $form->selectcontacts($object->socid, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'quatrevingtpercent', false, 0, 0, array(), 'multiple', 'contactid');
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -294,7 +294,6 @@ class FormAdvTargetEmailing extends Form
|
|||||||
|
|
||||||
$options_array = array();
|
$options_array = array();
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT rowid, code, label as civilite, active FROM ".MAIN_DB_PREFIX."c_civility";
|
$sql = "SELECT rowid, code, label as civilite, active FROM ".MAIN_DB_PREFIX."c_civility";
|
||||||
$sql .= " WHERE active = 1";
|
$sql .= " WHERE active = 1";
|
||||||
|
|
||||||
@ -312,7 +311,6 @@ class FormAdvTargetEmailing extends Form
|
|||||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||||
$label = ($langs->trans("Civility".$obj->code) != "Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->civilite != '-' ? $obj->civilite : ''));
|
$label = ($langs->trans("Civility".$obj->code) != "Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->civilite != '-' ? $obj->civilite : ''));
|
||||||
|
|
||||||
|
|
||||||
$options_array[$obj->code] = $label;
|
$options_array[$obj->code] = $label;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -628,7 +628,7 @@ if ($resql)
|
|||||||
if (!empty($arrayfields['ava.rowid']['checked']))
|
if (!empty($arrayfields['ava.rowid']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
||||||
print $form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1);
|
$form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1);
|
||||||
print ajax_combobox('search_availability');
|
print ajax_combobox('search_availability');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -736,11 +736,10 @@ if ($socid > 0)
|
|||||||
|
|
||||||
// Discount linked to invoice lines
|
// Discount linked to invoice lines
|
||||||
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
|
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
|
||||||
$sql .= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
|
|
||||||
$sql .= " rc.fk_facture_source,";
|
$sql .= " rc.fk_facture_source,";
|
||||||
$sql .= " u.login, u.rowid as user_id,";
|
$sql .= " u.login, u.rowid as user_id,";
|
||||||
$sql .= " f.rowid, f.ref,";
|
$sql .= " f.rowid as invoiceid, f.ref,";
|
||||||
$sql .= " fa.ref as ref, fa.type as type";
|
$sql .= " fa.ref as invoice_source_ref, fa.type as type";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."facturedet as fc";
|
$sql .= " , ".MAIN_DB_PREFIX."facturedet as fc";
|
||||||
@ -753,13 +752,13 @@ if ($socid > 0)
|
|||||||
$sql .= " AND rc.discount_type = 0"; // Eliminate supplier discounts
|
$sql .= " AND rc.discount_type = 0"; // Eliminate supplier discounts
|
||||||
$sql .= " ORDER BY dc DESC";
|
$sql .= " ORDER BY dc DESC";
|
||||||
//$sql.= " UNION ";
|
//$sql.= " UNION ";
|
||||||
// Remises liees a factures
|
// Discount linked to invoices
|
||||||
$sql2 = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
|
$sql2 = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
|
||||||
$sql2 .= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
|
$sql2 .= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
|
||||||
$sql2 .= " rc.fk_facture_source,";
|
$sql2 .= " rc.fk_facture_source,";
|
||||||
$sql2 .= " u.login, u.rowid as user_id,";
|
$sql2 .= " u.login, u.rowid as user_id,";
|
||||||
$sql2 .= " f.rowid, f.ref,";
|
$sql2 .= " f.rowid as invoiceid, f.ref,";
|
||||||
$sql2 .= " fa.ref as ref, fa.type as type";
|
$sql2 .= " fa.ref as invoice_source_ref, fa.type as type";
|
||||||
$sql2 .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql2 .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql2 .= " , ".MAIN_DB_PREFIX."user as u";
|
$sql2 .= " , ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql2 .= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
$sql2 .= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||||
@ -833,7 +832,7 @@ if ($socid > 0)
|
|||||||
{
|
{
|
||||||
print '<td class="minwidth100">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id = $obj->fk_facture_source;
|
$facturestatic->id = $obj->fk_facture_source;
|
||||||
$facturestatic->ref = $obj->ref;
|
$facturestatic->ref = $obj->invoice_source_ref;
|
||||||
$facturestatic->type = $obj->type;
|
$facturestatic->type = $obj->type;
|
||||||
print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturestatic->getNomURl(1);
|
print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturestatic->getNomURl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -842,7 +841,7 @@ if ($socid > 0)
|
|||||||
{
|
{
|
||||||
print '<td class="minwidth100">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id = $obj->fk_facture_source;
|
$facturestatic->id = $obj->fk_facture_source;
|
||||||
$facturestatic->ref = $obj->ref;
|
$facturestatic->ref = $obj->invoice_source_ref;
|
||||||
$facturestatic->type = $obj->type;
|
$facturestatic->type = $obj->type;
|
||||||
print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturestatic->getNomURl(1);
|
print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturestatic->getNomURl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -851,7 +850,7 @@ if ($socid > 0)
|
|||||||
{
|
{
|
||||||
print '<td class="minwidth100">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id = $obj->fk_facture_source;
|
$facturestatic->id = $obj->fk_facture_source;
|
||||||
$facturestatic->ref = $obj->ref;
|
$facturestatic->ref = $obj->invoice_source_ref;
|
||||||
$facturestatic->type = $obj->type;
|
$facturestatic->type = $obj->type;
|
||||||
print preg_replace('/\(EXCESS RECEIVED\)/', $langs->trans("Invoice"), $obj->description).' '.$facturestatic->getNomURl(1);
|
print preg_replace('/\(EXCESS RECEIVED\)/', $langs->trans("Invoice"), $obj->description).' '.$facturestatic->getNomURl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -862,7 +861,12 @@ if ($socid > 0)
|
|||||||
print $obj->description;
|
print $obj->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td class="left nowrap"><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
|
print '<td class="left nowrap">';
|
||||||
|
if ($obj->invoiceid)
|
||||||
|
{
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->invoiceid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled))
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
@ -909,8 +913,8 @@ if ($socid > 0)
|
|||||||
$sql .= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
|
$sql .= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
|
||||||
$sql .= " rc.fk_invoice_supplier_source,";
|
$sql .= " rc.fk_invoice_supplier_source,";
|
||||||
$sql .= " u.login, u.rowid as user_id,";
|
$sql .= " u.login, u.rowid as user_id,";
|
||||||
$sql .= " f.rowid, f.ref as ref,";
|
$sql .= " f.rowid as invoiceid, f.ref as ref,";
|
||||||
$sql .= " fa.ref, fa.type as type";
|
$sql .= " fa.ref as invoice_source_ref, fa.type as type";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."facture_fourn_det as fc";
|
$sql .= " , ".MAIN_DB_PREFIX."facture_fourn_det as fc";
|
||||||
@ -923,13 +927,13 @@ if ($socid > 0)
|
|||||||
$sql .= " AND rc.discount_type = 1"; // Eliminate customer discounts
|
$sql .= " AND rc.discount_type = 1"; // Eliminate customer discounts
|
||||||
$sql .= " ORDER BY dc DESC";
|
$sql .= " ORDER BY dc DESC";
|
||||||
//$sql.= " UNION ";
|
//$sql.= " UNION ";
|
||||||
// Remises liees a factures
|
// Discount linked to invoices
|
||||||
$sql2 = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
|
$sql2 = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
|
||||||
$sql2 .= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
|
$sql2 .= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
|
||||||
$sql2 .= " rc.fk_invoice_supplier_source,";
|
$sql2 .= " rc.fk_invoice_supplier_source,";
|
||||||
$sql2 .= " u.login, u.rowid as user_id,";
|
$sql2 .= " u.login, u.rowid as user_id,";
|
||||||
$sql2 .= " f.rowid, f.ref as ref,";
|
$sql2 .= " f.rowid as invoiceid, f.ref as ref,";
|
||||||
$sql2 .= " fa.ref, fa.type as type";
|
$sql2 .= " fa.ref as invoice_source_ref, fa.type as type";
|
||||||
$sql2 .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
$sql2 .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||||
$sql2 .= " , ".MAIN_DB_PREFIX."user as u";
|
$sql2 .= " , ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql2 .= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
$sql2 .= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||||
@ -1003,7 +1007,7 @@ if ($socid > 0)
|
|||||||
{
|
{
|
||||||
print '<td class="minwidth100">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id = $obj->fk_invoice_supplier_source;
|
$facturefournstatic->id = $obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref = $obj->ref;
|
$facturefournstatic->ref = $obj->invoice_source_ref;
|
||||||
$facturefournstatic->type = $obj->type;
|
$facturefournstatic->type = $obj->type;
|
||||||
print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturefournstatic->getNomURl(1);
|
print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturefournstatic->getNomURl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1012,7 +1016,7 @@ if ($socid > 0)
|
|||||||
{
|
{
|
||||||
print '<td class="minwidth100">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id = $obj->fk_invoice_supplier_source;
|
$facturefournstatic->id = $obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref = $obj->ref;
|
$facturefournstatic->ref = $obj->invoice_source_ref;
|
||||||
$facturefournstatic->type = $obj->type;
|
$facturefournstatic->type = $obj->type;
|
||||||
print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturefournstatic->getNomURl(1);
|
print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturefournstatic->getNomURl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1021,7 +1025,7 @@ if ($socid > 0)
|
|||||||
{
|
{
|
||||||
print '<td class="minwidth100">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id = $obj->fk_invoice_supplier_source;
|
$facturefournstatic->id = $obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref = $obj->ref;
|
$facturefournstatic->ref = $obj->invoice_source_ref;
|
||||||
$facturefournstatic->type = $obj->type;
|
$facturefournstatic->type = $obj->type;
|
||||||
print preg_replace('/\(EXCESS PAID\)/', $langs->trans("Invoice"), $obj->description).' '.$facturefournstatic->getNomURl(1);
|
print preg_replace('/\(EXCESS PAID\)/', $langs->trans("Invoice"), $obj->description).' '.$facturefournstatic->getNomURl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1032,7 +1036,11 @@ if ($socid > 0)
|
|||||||
print $obj->description;
|
print $obj->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td class="left nowrap"><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
|
print '<td class="left nowrap">';
|
||||||
|
if ($obj->invoiceid) {
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->invoiceid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled))
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class Orders extends DolibarrApi
|
|||||||
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id
|
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id
|
||||||
* @return array|mixed data without useless information
|
* @return array|mixed data without useless information
|
||||||
*
|
*
|
||||||
* @url GET byRef/{ref}
|
* @url GET ref/{ref}
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
@ -94,7 +94,7 @@ class Orders extends DolibarrApi
|
|||||||
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id
|
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id
|
||||||
* @return array|mixed data without useless information
|
* @return array|mixed data without useless information
|
||||||
*
|
*
|
||||||
* @url GET byRefExt/{ref_ext}
|
* @url GET ref_ext/{ref_ext}
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -976,8 +976,6 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX."commande SET ref='".$this->db->escape($initialref)."' WHERE rowid=".$this->id;
|
$sql = 'UPDATE '.MAIN_DB_PREFIX."commande SET ref='".$this->db->escape($initialref)."' WHERE rowid=".$this->id;
|
||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
|
||||||
if ($this->id)
|
|
||||||
{
|
{
|
||||||
$this->ref = $initialref;
|
$this->ref = $initialref;
|
||||||
|
|
||||||
@ -1052,7 +1050,6 @@ class Commande extends CommonOrder
|
|||||||
}
|
}
|
||||||
else dol_print_error($resqlcontact);
|
else dol_print_error($resqlcontact);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -174,7 +174,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
print dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
$modulepart = 'commande';
|
$modulepart = 'commande';
|
||||||
$permission = $user->rights->commande->creer;
|
$permission = $user->rights->commande->creer;
|
||||||
|
|||||||
@ -80,7 +80,7 @@ $search_total_ttc = GETPOST('search_total_ttc', 'alpha');
|
|||||||
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
|
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
$billed = GETPOST('billed', 'int');
|
$billed = GETPOST('billed', 'int');
|
||||||
$viewstatut = GETPOST('viewstatut');
|
$viewstatut = GETPOST('viewstatut', 'int');
|
||||||
$search_btn = GETPOST('button_search', 'alpha');
|
$search_btn = GETPOST('button_search', 'alpha');
|
||||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||||
$search_project_ref = GETPOST('search_project_ref', 'alpha');
|
$search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||||
|
|||||||
@ -107,7 +107,7 @@ else
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
if (empty($min)) $min = dol_now - 3600 * 24;
|
if (empty($min)) $min = dol_now() - 3600 * 24;
|
||||||
|
|
||||||
$log = "graph.php: min=".$min." max=".$max;
|
$log = "graph.php: min=".$min." max=".$max;
|
||||||
dol_syslog($log);
|
dol_syslog($log);
|
||||||
|
|||||||
@ -157,9 +157,7 @@ if ($result)
|
|||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if ($user->rights->banque->modifier)
|
if ($user->rights->banque->modifier)
|
||||||
{
|
{
|
||||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('MenuNewVariousPayment').'</span>';
|
$newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create');
|
||||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
|
||||||
$newcardbutton.= '</a>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
@ -306,7 +304,7 @@ if ($result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Debit
|
// Debit
|
||||||
print "<td class=\"right\">";
|
print '<td class="nowrap right">';
|
||||||
if ($obj->sens == 0)
|
if ($obj->sens == 0)
|
||||||
{
|
{
|
||||||
print price($obj->amount);
|
print price($obj->amount);
|
||||||
@ -317,7 +315,7 @@ if ($result)
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
// Credit
|
// Credit
|
||||||
print "<td class=\"right\">";
|
print '<td class="nowrap right">';
|
||||||
if ($obj->sens == 1)
|
if ($obj->sens == 1)
|
||||||
{
|
{
|
||||||
print price($obj->amount);
|
print price($obj->amount);
|
||||||
@ -325,17 +323,16 @@ if ($result)
|
|||||||
}
|
}
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='total_cred';
|
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='total_cred';
|
||||||
print "</td>";
|
print '</td>' ;
|
||||||
|
print '<td></td>';
|
||||||
|
|
||||||
print "<td></td>";
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$colspan = 4;
|
|
||||||
if (!empty($conf->banque->enabled)) $colspan++;
|
|
||||||
if (!empty($conf->accounting->enabled)) $colspan++;
|
|
||||||
|
|
||||||
// Show total line
|
// Show total line
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -171,9 +171,7 @@ if ($resql)
|
|||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if ($user->rights->tax->charges->creer)
|
if ($user->rights->tax->charges->creer)
|
||||||
{
|
{
|
||||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/sociales/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('MenuNewSocialContribution').'</span>';
|
$newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewSocialContribution'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/sociales/card.php?action=create');
|
||||||
$newcardbutton .= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
|
||||||
$newcardbutton .= '</a>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
@ -267,15 +265,16 @@ if ($resql)
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td width="60">';
|
print "<td>".$chargesociale_static->getNomUrl(1, '20')."</td>\n";
|
||||||
print $chargesociale_static->getNomUrl(1, '20');
|
if (! $i) $totalarray['nbfield']++;
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<td>'.dol_trunc($obj->label, 42).'</td>';
|
print "<td>".dol_trunc($obj->label, 42)."</td>\n";
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<td>'.$obj->type_label.'</td>';
|
print "<td>".$obj->type_label."</td>\n";
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
// Date end period
|
// Date end period
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@ -287,21 +286,26 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print "</td>\n";
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="right" width="100">'.price($obj->amount).'</td>';
|
print '<td class="nowrap right">'.price($obj->amount).'</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totalttcfield';
|
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totalttcfield';
|
||||||
$totalarray['val']['totalttcfield'] += $obj->amount;
|
$totalarray['val']['totalttcfield'] += $obj->amount;
|
||||||
|
|
||||||
// Due date
|
// Due date
|
||||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
print '<td class="nowrap right">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
print '<td class="nowrap right">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -231,7 +231,7 @@ else
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
// Actions buttons
|
// Actions buttons
|
||||||
|
|||||||
@ -75,6 +75,7 @@ if ($action == 'add' && !empty($permissiontoadd))
|
|||||||
if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') $value = ''; // This is an implicit foreign key field
|
if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') $value = ''; // This is an implicit foreign key field
|
||||||
if (!empty($object->fields[$key]['foreignkey']) && $value == '-1') $value = ''; // This is an explicit foreign key field
|
if (!empty($object->fields[$key]['foreignkey']) && $value == '-1') $value = ''; // This is an explicit foreign key field
|
||||||
|
|
||||||
|
//var_dump($key.' '.$value.' '.$object->fields[$key]['type']);
|
||||||
$object->$key = $value;
|
$object->$key = $value;
|
||||||
if ($val['notnull'] > 0 && $object->$key == '' && !is_null($val['default']) && $val['default'] == '(PROV)')
|
if ($val['notnull'] > 0 && $object->$key == '' && !is_null($val['default']) && $val['default'] == '(PROV)')
|
||||||
{
|
{
|
||||||
|
|||||||