mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge branch 'develop' into 10.0_closure2
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
# EditorConfig is awesome: https://editorconfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
@@ -11,9 +12,10 @@ insert_final_newline = true
|
||||
# PHP PSR-2 Coding Standards
|
||||
# http://www.php-fig.org/psr/psr-2/
|
||||
[*.php]
|
||||
indent_style = space
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
[*.js]
|
||||
indent_style = tab
|
||||
[*.css]
|
||||
|
||||
@@ -19,7 +19,7 @@ PHPDebugBar 1.15.0 MIT License Yes Used only by
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
Mobiledetect 2.8.17 MIT License Yes Detect mobile devices browsers
|
||||
Mobiledetect 2.8.83 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
|
||||
@@ -35,7 +35,7 @@ Restler 3.0.0RC6 LGPL-3+ Yes
|
||||
TCPDF 6.2.25 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 4.7.0 MIT licence Yes Library for Stripe module
|
||||
Stripe 6.34.5 MIT licence Yes Library for Stripe module
|
||||
|
||||
JS libraries:
|
||||
jQuery 3.3.1 MIT License Yes JS library
|
||||
|
||||
268
ChangeLog
268
ChangeLog
@@ -3,25 +3,164 @@ English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
|
||||
For Users:
|
||||
NEW: Module "Ticket" is available as a stable module.
|
||||
NEW: module "Email Collector" is available as a stable module.
|
||||
NEW: module "TakePOS" is available as a stable module.
|
||||
NEW: Module "Email Collector" is available as a stable module.
|
||||
NEW: Module "TakePOS" is available as a stable module.
|
||||
NEW: Experimental module "Vendor receptions".
|
||||
NEW: Experimental module "BOM".
|
||||
FIX: Disallow line start date if after end date.
|
||||
NEW: Accounting - Add default accounting account for member subcriptions.
|
||||
NEW: Accounting - More comprehensive menu.
|
||||
NEW: Agenda/event - add description column available in list (hidden by default).
|
||||
NEW: Add accounting account for result.
|
||||
NEW: Add accounting code for EEC sales and export sales on products.
|
||||
NEW: Add a security permission to edit php dynamic content on the WebSite module.
|
||||
NEW: Attached document on bank account are now visible in automatic ECM.
|
||||
NEW: Add Autofill Remainder Amount picto on the Expense Report Payment Page.
|
||||
NEW: Add contact status in category export
|
||||
NEW: Add Default Warehouse to user record (if module stock is on)
|
||||
NEW: Add employee/user to subledger account list
|
||||
NEW: Add gender in member card
|
||||
NEW: Add getFormatedCustomerRef and getFormatedSupplierRef methods
|
||||
NEW: Add history to view and print previous sales on TakePos.
|
||||
NEW: Add import of accounting account for intra/export selling on product card
|
||||
NEW: Adding code to show update date of supplier price shown
|
||||
NEW: Add line total on list of payments
|
||||
NEW: Add LinkedIn field in social network module
|
||||
NEW: Add more complete error messages in log on stripe payments
|
||||
NEW: Add no_email field in contact list
|
||||
NEW: Add notes are show in tooltips
|
||||
NEW: Add option DONATION_USE_THIRDPARTIES in admin of membership module
|
||||
NEW: Add option STOCK_SHOW_VIRTUAL_STOCK_IN_PRODUCTS_COMBO
|
||||
NEW: add page to setup opening hours of the company
|
||||
NEW: add payments table to pdf of expense report
|
||||
NEW: add payment terms to invoices list
|
||||
NEW: Add picto of deletion on mass action combo lists
|
||||
NEW: add product extrafields available into shipping export
|
||||
NEW: add ref supplier on supplier invoice
|
||||
NEW: Add stats on entries & movements by fiscal year
|
||||
NEW: Add subledger in various payment module
|
||||
NEW: Add tag for ODT generation for localtax rates
|
||||
NEW: Add the now link when creating expense report
|
||||
NEW: Ask date of invoice when using the Clone feature.
|
||||
NEW: auto event msg
|
||||
NEW: Automatically binding for intra/export accountancy code in customer list
|
||||
NEW: automatic / manual selector form
|
||||
NEW: Better explanation for setup of WebDav module
|
||||
NEW: Can add more lines on situation invoices at end of project when there is extra to add.
|
||||
NEW: Can change the customer account of an instance
|
||||
NEW: Can choose the root category to show products for TakePOS module
|
||||
NEW: Can edit supplier on draft order supplier
|
||||
NEW: Can enter price with or without tax when entering expense repor line
|
||||
NEW: Can filter on the date of period for social contributions
|
||||
NEW: Can generate invoices from the timespent entered on a project
|
||||
NEW: Can update product supplier price ref
|
||||
NEW: Can upload files from the edit page of expense report
|
||||
NEW: Color for hover and for checked line is on by default
|
||||
NEW: Column of parent company is available in list of third parties
|
||||
NEW: conditionnal add member button by statut
|
||||
NEW: constant KEEP_DISCOUNT_LINES_FROM_ORIGIN
|
||||
NEW: Contact related items tab
|
||||
NEW: Can create of supplier invoice from a reception
|
||||
NEW: Ensure External RSS Links Open in New Window
|
||||
NEW: Export available for reception module
|
||||
NEW: Extend import option to Order's card and Propal's card
|
||||
NEW: filter by thirdparty on report CA by prod/serv
|
||||
NEW: Save space by moving the meteo on the title line
|
||||
NEW: Get the list of groups of a user with the REST API.
|
||||
NEW: Hidden option MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER to edit supplier on draft supplier order
|
||||
NEW: Improve Displaying Shortcut Access Keys in Navigation.
|
||||
NEW: Improve Expensereport, Inverse Receiver.
|
||||
NEW: Improve pdf description item visibitity.
|
||||
NEW: Introduce a config parameter $dolibarr_main_instance_unique_id
|
||||
NEW: Introduce css "nobottomiftotal"
|
||||
NEW: Introduce PhpSpreadsheet for export (need php5.6+)
|
||||
NEW: Invoice creation from the timesheet
|
||||
NEW: Can list remote stripe's payout in a dedicated page.
|
||||
NEW: Manage account sell_intra & sell_export in page accoutancy admin default product
|
||||
NEW: Manage loan schedule.
|
||||
NEW: Manage status of member types.
|
||||
NEW: Mass action "create bills" for validated reception
|
||||
NEW: Measuring unit are now defined into an editable dictionary. Add product size/unit into product import.
|
||||
NEW: Template pdf 'canelle_reception' displays linked reception lines.
|
||||
NEW: Moral/physic status can be defined at member type level
|
||||
NEW: Pagination into list of time spent.
|
||||
NEW: Performance enhancement (Replace dirname(__FILE__) with __DIR__)
|
||||
NEW: POS support in order (ex: online cart).
|
||||
NEW: Preview of images into the filemanager component.
|
||||
NEW: Resource module can be used in products/services (in a dedicated tab)
|
||||
NEW: Retrieve invoice infos from order when billing shipment
|
||||
NEW: Save and display type of membership in subscription table for more explicit historic
|
||||
NEW: Setup default thirdparty type (customer or prospect/customer)
|
||||
NEW: Add shipping "set draft" button and can update lines.
|
||||
NEW: show in blod, the invoice amount where we came from, when making payment
|
||||
NEW: Show product dimensions in product tooltips.
|
||||
NEW: Show the latest date of subscription in member statistics reports.
|
||||
NEW: Sort list of templates alphabetically
|
||||
NEW: Stripe Payment Intent (need option to use this new Stripe api method)
|
||||
NEW: Can support barcode on supplier price references.
|
||||
NEW: Support tag {ccc} on payment ref
|
||||
NEW: The preview of PDF files generates only 1 png file, even if several pages.
|
||||
NEW: Can select a Thirdparty object in donation module if option ON.
|
||||
NEW: Tooltip with VAT amount and price incl tax on lines of objects.
|
||||
NEW: Unsubscribed emails are now stored in a dedicated table.
|
||||
NEW: Update working chkbxlst filter for lists.
|
||||
NEW: Use ajax switch into setup of donation.php and multi-currency module.
|
||||
NEW: use recipient language when generating the fullname for emails.
|
||||
NEW: When you create product or service, sell accountancy account by default is suggested.
|
||||
NEW: Widget birthdays of the month.
|
||||
NEW: Option in workflow module to set a reception billed on validate supplier bill.
|
||||
NEW: Autocompletion on lists should be available on mobile applications.
|
||||
NEW: Add mass action to close several members.
|
||||
|
||||
For Developers:
|
||||
NEW: Module "DebugBar" is available as a stable module.
|
||||
NEW: Add API REST for donations
|
||||
NEW: Add a script 'purge-data.php' to purge data older than a defined creation date
|
||||
NEW: Add constant XFRAMEOPTIONS_ALLOWALL
|
||||
NEW: Add function isValidVATID()
|
||||
NEW: ADD document's product support in APIs
|
||||
NEW: REST API: get the list of objects in a category.
|
||||
NEW: Update Stripe library to 6.35
|
||||
NEW: Upgrade jquery lib to 3.3.1
|
||||
NEW: Add hook 'addHtmlHeader()'
|
||||
NEW: Add hook 'createRecurringInvoices()'
|
||||
NEW: Add hook 'afterSelectContactOptions'
|
||||
NEW: Add hook support in accountancy index
|
||||
NEW: Add hook support in list of template invoices
|
||||
NEW: Add parameter 'replaceambiguouschars' on getRandomPassword function
|
||||
NEW: Add property 'noteditable' in modulebuilder
|
||||
NEW: Add the current modulepart into the Conf class object
|
||||
NEW: Add trigger FICHINTER_UNVALIDATE
|
||||
NEW: Add visibility with value 4 in framework to define fields to show
|
||||
NEW: More option to tune initialization of a new module with modulebuilder.
|
||||
NEW: API to list currencies
|
||||
NEW: API Proposal, Orders, Invoices: Add contact details
|
||||
NEW: hidden option to change concat desc order
|
||||
NEW: Enhance management of webhooks
|
||||
NEW: Generation of doc by modulebuilder can include README and CHANGELOG
|
||||
NEW: massfilesarea feature for external modules
|
||||
NEW: Show enabled modules in dol_print_error()
|
||||
NEW: Simplification of CSS styles of default themes.
|
||||
NEW: Clean code of a lot of deprecated code.
|
||||
NEW: Add hidden option to set a search entry to the top
|
||||
NEW: add hidden option DISPLAY_DISCOUNTED_SUPPLIER_PRICE
|
||||
NEW: add hidden option MAIN_DEFAULT_LANGUAGE_FILTER
|
||||
NEW: add hidden option NO_CONCAT_DESCRIPTION
|
||||
NEW: Add hidden option for ACCOUNTANCY_COMBO_FOR_AUX
|
||||
NEW: Add hidden option 'ADD_UNSPLASH_LOGIN_BACKGROUND'
|
||||
NEW: Add Hidden option 'OVERRIDE_VAT_FOR_EXPENSE_REPORT'
|
||||
NEW: add hidden option MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT
|
||||
NEW: Hidden conf to improve pdf desc item visibitity
|
||||
NEW: Look and feel v10 - Add CSS 'tabBarNoTop'
|
||||
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* PHP 5.4 is no more supported. Minimum PHP is now 5.5+.
|
||||
* The PHP extension php-intl is not mandatory but should be installed to have new features working correctly.
|
||||
* The PHP extension php-intl is not mandatory and must be installed to have new features working correctly.
|
||||
* Method GetUrlTrackingStatus were renamed into getUrlTrackingStatus for consistency with naming rules.
|
||||
* API getListOfCivility has been renamed into getListOfCivilities for consistency with naming rules.
|
||||
* Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.;
|
||||
@@ -36,8 +175,43 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Removed deprecated use of string in dol_print_date(). Only date allowed.
|
||||
* Deprecated property ->fk_departement is now ->state_id everywhere.
|
||||
* Removed the method 4 of GETPOST (to get $_COOKIE). It was not used and not recommanded to use in Dolibarr.
|
||||
* Column llx_facture.facnumber change to llx_facture.ref
|
||||
|
||||
|
||||
***** ChangeLog for 9.0.3 compared to 9.0.2 *****
|
||||
FIX: #11013
|
||||
FIX: #11041
|
||||
FIX: actioncomm: sort events by date after external calendars and hook (into 7.0)
|
||||
FIX: better test
|
||||
FIX: Combo list was limited to 20 in stock correction
|
||||
FIX: Confusion between expired and late
|
||||
FIX: Cursor pointer in payment screen for autofill
|
||||
FIX: CVE-2019-11199
|
||||
FIX: CVE-2019-11200
|
||||
FIX: CVE-2019-11201
|
||||
FIX: Default value on form to send email
|
||||
FIX: error messages not displayed
|
||||
FIX: Massive debug in lettering function
|
||||
FIX: missing compatibility with multicompany
|
||||
FIX: missing global $user
|
||||
FIX: missing situation invoice in list
|
||||
FIX: MultiEntity in lettering functionality
|
||||
FIX: Product accountancey sell intra code must be visible if main feature level 1
|
||||
FIX: ref for table without ref manager are set to NULL.
|
||||
FIX: Sending email to mass actions send same email on same customer
|
||||
FIX: Several fixes on import of services/products
|
||||
FIX: shipping default warehouse if only one warehouse
|
||||
FIX: sortfield on lettering function
|
||||
FIX: Status of opportunity should never be -1
|
||||
FIX: test to display create invoice button on supplier_order card
|
||||
FIX: The autocopy feature was ko for suppliers
|
||||
FIX: Total per day in timespent per week
|
||||
FIX: Total per day shows 00:00 if the total time spent is equal to 12:00
|
||||
FIX: Update/delete currency on same languages
|
||||
FIX: Wrong variable name make contact of supplier order not used on PDF.
|
||||
FIX: Add hidden option MAIN_PDF_HIDE_SITUATION to hide situation (quick hack to fix output pb).
|
||||
FIX: attached files list with link file was broked
|
||||
|
||||
***** ChangeLog for 9.0.2 compared to 9.0.1 *****
|
||||
FIX: #10822
|
||||
FIX: Accountancy - Format EBP import
|
||||
@@ -257,6 +431,90 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Remove the no more used and deprecated dol_print_graph function
|
||||
|
||||
|
||||
***** ChangeLog for 8.0.5 compared to 8.0.4 *****
|
||||
FIX: #10381
|
||||
FIX: #10460 compatibility with MariaDB 10.4
|
||||
FIX: #11025
|
||||
FIX: Accountancy - Add transaction with multicompany use all the time 1st entity
|
||||
FIX: Accountancy - Format EBP import
|
||||
FIX: actioncomm export: ORDER BY clause is in wrong export property + event type filter does not work
|
||||
FIX: actioncomm: sort events by date after external calendars and hook
|
||||
FIX: action list: add printFieldListSelect and printFieldListWhere hooks
|
||||
FIX: add fk_unit on addline action
|
||||
FIX: avoid php warning
|
||||
FIX: bad sql request
|
||||
FIX: better method
|
||||
FIX: better test
|
||||
FIX: better test on fetch
|
||||
FIX: broken external authentication module feature and avoid warning
|
||||
FIX: Can not create contract with numbering module without autogen rule
|
||||
FIX: can't add lines on invoices
|
||||
FIX: Can't generate invoice pdf
|
||||
FIX: Can't insert if there is extrafields mandatory on another entity.
|
||||
FIX: Can't insert if there is extrafields mandatory on another entity. FIX: Can't set default value of extrafield of type varchar
|
||||
FIX: Check for old picture name if the new one was not found
|
||||
FIX: Civility not saved when creating a member.
|
||||
FIX: $conf->fournisseur->commande->enabled doesn't exist, we must use $conf->fournisseur->enabled
|
||||
FIX: could not create several superadmin in transversal mode
|
||||
FIX: credit note can have negative value
|
||||
FIX: Default value on sales representative on third party creation
|
||||
FIX: Don't show journal:getNomUrl without data
|
||||
FIX: Erreur dans le Total
|
||||
FIX: error messages not displayed
|
||||
FIX: expedition: reset status on rollback + replace hardcoded status with const
|
||||
FIX: Fix PHP warning "count(): Parameter must be an array..."
|
||||
FIX: fk_default_warehouse missing in group by
|
||||
FIX: function sendEmailsReminder isn't completely developed, then MAIN_FEATURES_LEVEL must be 2 to "use" it
|
||||
FIX: holidays get natural_search if search params are set only
|
||||
FIX: if empty error message, we just see "error" displayed
|
||||
FIX: if(!method_exists(dol_loginfunction))
|
||||
FIX: If we build one invoice for several orders, we must put the ref of order on the line to not lose information.
|
||||
FIX: in fact expensereport must be in $check array
|
||||
FIX: Interface regression for bind people. Fix option MAIN_OPTIMIZEFORTEXTBROWSER
|
||||
FIX: line edit template: keep fk_parent_line
|
||||
FIX: Loan impossible to account
|
||||
FIX: Mark credit note as available for credit note in other currency
|
||||
FIX: missing access security checking with multicompany
|
||||
FIX: missing entity filter and wrong var name
|
||||
FIX: missing entity filter in function "build_filterField()" (export)
|
||||
FIX: Missing field in import/export of users
|
||||
FIX: missing hook completeTabsHead in margins module
|
||||
FIX: missing $ismultientitymanaged for previous/next ref
|
||||
FIX: Missing province in export of invoice
|
||||
FIX: multicompany compatibility
|
||||
FIX: must fetch member in current entity
|
||||
FIX: need an order by in case we found other invoice with same number but not same date
|
||||
FIX: need to round with 2 decimals to avoid movements not correctly balanced
|
||||
FIX: no need to test anything to display documents tabs on expense report
|
||||
FIX: positive values creating diff on addline rounding
|
||||
FIX: problem with multicompany transverse mode
|
||||
FIX: Product accountancey sell intra code must be visible if main feature level 1
|
||||
FIX: project_title for display of getNomUrl()
|
||||
FIX: quick search for supplier orders
|
||||
FIX: Remane of project
|
||||
FIX: same thing here
|
||||
FIX: Selection of email recipient with option MAIN_OPTIMIZEFORTEXTBROWSER
|
||||
FIX: several hooks in shipping/delivery cards
|
||||
FIX: shipping default warehouse if only one warehouse
|
||||
FIX: SQL injection on rowid of dict.php
|
||||
FIX: 'statut' is ignored when updating a user with the REST API.
|
||||
FIX: supplier invoice payment total dont care about deposit or credit
|
||||
FIX: supplier invoice product stats total ht is line total not invoice total
|
||||
FIX: The minimum amount filter does not work in the VAT report per customer
|
||||
FIX: Total per day shows 00:00 if the total time spent is equal to 12:00
|
||||
FIX: Update/delete currency on same languages
|
||||
FIX: [URGENT] broken feature, "$usercancreate" is for Dolibarr 9
|
||||
FIX: useless join
|
||||
FIX: we need to keep originline special_code
|
||||
FIX: we want to be able to reopen fourn credit note
|
||||
FIX: when 2 extra fields are mandatory in 2 different entities
|
||||
FIX: when we add a payment on an invoice which already has payments with credit note or deposit amount, and then we get an excess received, discount amount must be $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
||||
FIX: when we create deposit with multi tva, we mustn't add line if amount = 0 (example when we have a 100% reduc on one of origin invoice line)
|
||||
FIX: wrong redirect link on holiday refuse
|
||||
FIX: wrong test enabled
|
||||
FIX: Wrong variable name
|
||||
FIX: XSS
|
||||
|
||||
***** ChangeLog for 8.0.4 compared to 8.0.3 *****
|
||||
FIX: #10030 better german chart
|
||||
FIX: #10036
|
||||
|
||||
@@ -129,7 +129,7 @@ $BUILDROOT="$TEMP/buildroot";
|
||||
$result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" );
|
||||
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
|
||||
while (<IN>) {
|
||||
if ( $_ =~ /define\('DOL_VERSION','([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
|
||||
if ( $_ =~ /define\('DOL_VERSION',\s*'([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
|
||||
}
|
||||
close IN;
|
||||
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
|
||||
@@ -357,7 +357,7 @@ if ($nboftargetok) {
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n";
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'. But you can regenerate it with command:\n";
|
||||
}
|
||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||
{
|
||||
|
||||
14
build/phpstan/bootstrap.php
Normal file
14
build/phpstan/bootstrap.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// Example to use PHPStan
|
||||
// cd git/dolibarr
|
||||
// /usr/bin/php7.2 ../phpstan.phar -l1 analyze htdocs/societe/website.php --memory-limit 2G
|
||||
|
||||
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
|
||||
define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
|
||||
define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
|
||||
define('DOL_URL_ROOT', '/');
|
||||
|
||||
// Load the main.inc.php file to have finctions llx_Header and llx_Footer defined
|
||||
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
|
||||
global $conf, $langs, $user, $db;
|
||||
include_once __DIR__ . '/../../htdocs/main.inc.php';
|
||||
@@ -191,7 +191,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/ftp
|
||||
%_datadir/dolibarr/htdocs/holiday
|
||||
%_datadir/dolibarr/htdocs/hrm
|
||||
%_datadir/dolibarr/htdocs/ifttt
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
|
||||
@@ -271,7 +271,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/ftp
|
||||
%_datadir/dolibarr/htdocs/holiday
|
||||
%_datadir/dolibarr/htdocs/hrm
|
||||
%_datadir/dolibarr/htdocs/ifttt
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
|
||||
@@ -188,7 +188,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/ftp
|
||||
%_datadir/dolibarr/htdocs/holiday
|
||||
%_datadir/dolibarr/htdocs/hrm
|
||||
%_datadir/dolibarr/htdocs/ifttt
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
|
||||
@@ -199,7 +199,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/ftp
|
||||
%_datadir/dolibarr/htdocs/holiday
|
||||
%_datadir/dolibarr/htdocs/hrm
|
||||
%_datadir/dolibarr/htdocs/ifttt
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
|
||||
@@ -247,11 +247,10 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">' . $langs->trans("Addanaccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create');
|
||||
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Box to select active chart of account
|
||||
print $langs->trans("Selectchartofaccounts") . " : ";
|
||||
@@ -298,7 +297,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="' . $search_pcgtype . '"></td>';
|
||||
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgsubtype" value="' . $search_pcgsubtype . '"></td>';
|
||||
if (! empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@@ -390,11 +389,11 @@ if ($resql)
|
||||
{
|
||||
print '<td>';
|
||||
if (empty($obj->active)) {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -522,7 +522,6 @@ if ($id)
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='country') {
|
||||
if (in_array('region_id', $fieldlist)) { print '<td> </td>'; continue; } // For region page, we do not show the country input
|
||||
@@ -583,10 +582,6 @@ if ($id)
|
||||
|
||||
$colspan=count($fieldlist)+3;
|
||||
|
||||
if (! empty($alabelisused)) // If there is one label among fields, we show legend of *
|
||||
{
|
||||
print '<tr><td colspan="'.$colspan.'">* '.$langs->trans("LabelUsedByDefault").'.</td></tr>';
|
||||
}
|
||||
print '<tr><td colspan="'.$colspan.'"> </td></tr>'; // Keep to have a line with enough height
|
||||
}
|
||||
|
||||
@@ -667,7 +662,6 @@ if ($id)
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') {
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='country') {
|
||||
$valuetoshow=$langs->trans("Country");
|
||||
|
||||
@@ -111,14 +111,9 @@ if ($result)
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (! empty($user->rights->accounting->fiscalyear))
|
||||
{
|
||||
$addbutton = '<a class="butActionNew" href="fiscalyear_card.php?action=create"><span class="valignmiddle text-plus-circle">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$addbutton = '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
|
||||
$addbutton.= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->rights->accounting->fiscalyear);
|
||||
|
||||
|
||||
$title = $langs->trans('AccountingPeriods');
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $addbutton, '', $limit, 1);
|
||||
|
||||
@@ -214,11 +214,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@@ -227,11 +227,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@@ -240,11 +240,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@@ -253,11 +253,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@@ -266,11 +266,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTANCY_COMBO_FOR_AUX") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenablesubsidiarylist&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setenablesubsidiarylist&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenablesubsidiarylist&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setenablesubsidiarylist&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@@ -279,11 +279,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
@@ -531,11 +531,11 @@ if ($action == 'create')
|
||||
print '<td class="titlefield">' . $langs->trans("Status") . '</td>';
|
||||
print '<td>';
|
||||
if (empty($object->validated)) {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=enable">';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=enable">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=disable">';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=disable">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -443,19 +443,18 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
$listofformat=AccountancyExport::getType();
|
||||
$button = '<a class="butAction" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">';
|
||||
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
|
||||
else $button.= $langs->trans("ExportList");
|
||||
//$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
|
||||
$button.= '</a>';
|
||||
|
||||
if (count($filter)) $buttonLabel = $langs->trans("ExportFilteredList");
|
||||
else $buttonLabel = $langs->trans("ExportList");
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($buttonLabel, '', 'fa fa-file-export', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:''));
|
||||
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-object-group', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param);
|
||||
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle', './card.php?action=create');
|
||||
|
||||
|
||||
$groupby = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param.'">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$newcardbutton, '', $limit);
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
@@ -256,10 +256,8 @@ if ($action == 'delbookkeepingyear') {
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
|
||||
$viewflat = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param.'">' . $langs->trans("ViewFlatList") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle', './card.php?action=create');
|
||||
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
|
||||
@@ -37,11 +37,12 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","accountancy"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$show_files = GETPOST('show_files', 'int');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@@ -186,21 +187,25 @@ if (! $resql) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$param='';
|
||||
$param.="&socid=".urlencode($socid);
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
dol_syslog("/accountancy/bookkeeping/thirdparty_lettering_customer.php", LOG_DEBUG);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
|
||||
$param="&socid=".$socid;
|
||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
|
||||
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
||||
|
||||
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
|
||||
//$letteringbutton = '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=lettering" value="lettering" name="lettering" id="lettering"><span class="valignmiddle">' . $langs->trans("Lettering") . '</span></a>';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit);
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="liste" width="100%">'."\n";
|
||||
|
||||
/*
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -37,11 +36,12 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","accountancy"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$show_files = GETPOST('show_files', 'int');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@@ -176,21 +176,25 @@ while ($obj = $db->fetch_object($resql)) {
|
||||
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
|
||||
dol_syslog("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
|
||||
dol_syslog("/accountancy/bookkeeping/thirdparty_lettering_supplier.php", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql) {
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
|
||||
$param='';
|
||||
$param.="&socid=".urlencode($socid);
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
dol_syslog("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
|
||||
dol_syslog("/accountancy/bookkeeping/thirdparty_lettering_supplier.php", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
$param="&socid=".$socid;
|
||||
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
|
||||
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
||||
|
||||
@@ -198,7 +202,8 @@ if ($resql) {
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit);
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="liste" width="100%">'."\n";
|
||||
|
||||
/*
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@@ -50,6 +50,7 @@ class AccountancyExport
|
||||
public static $EXPORT_TYPE_COGILOG = 8;
|
||||
public static $EXPORT_TYPE_AGIRIS = 9;
|
||||
public static $EXPORT_TYPE_FEC = 11;
|
||||
public static $EXPORT_TYPE_OPENCONCERTO = 12;
|
||||
|
||||
|
||||
/**
|
||||
@@ -103,6 +104,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
|
||||
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
|
||||
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'),
|
||||
self::$EXPORT_TYPE_OPENCONCERTO => $langs->trans('Modelcsv_openconcerto'),
|
||||
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
||||
);
|
||||
}
|
||||
@@ -126,6 +128,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_EBP => 'ebp',
|
||||
self::$EXPORT_TYPE_COGILOG => 'cogilog',
|
||||
self::$EXPORT_TYPE_AGIRIS => 'agiris',
|
||||
self::$EXPORT_TYPE_OPENCONCERTO => 'openconcerto',
|
||||
self::$EXPORT_TYPE_FEC => 'fec',
|
||||
);
|
||||
|
||||
@@ -187,6 +190,10 @@ class AccountancyExport
|
||||
'label' => $langs->trans('Modelcsv_FEC'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||
),
|
||||
self::$EXPORT_TYPE_OPENCONCERTO => array(
|
||||
'label' => $langs->trans('Modelcsv_openconcerto'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'csv',
|
||||
),
|
||||
),
|
||||
'cr'=> array (
|
||||
'1' => $langs->trans("Unix"),
|
||||
@@ -248,6 +255,9 @@ class AccountancyExport
|
||||
case self::$EXPORT_TYPE_AGIRIS :
|
||||
$this->exportAgiris($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_OPENCONCERTO :
|
||||
$this->exportOpenConcerto($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_FEC :
|
||||
$this->exportFEC($TData);
|
||||
break;
|
||||
@@ -588,6 +598,39 @@ class AccountancyExport
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export format : OpenConcerto
|
||||
*
|
||||
* @param array $objectLines data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function exportOpenConcerto($objectLines)
|
||||
{
|
||||
|
||||
$separator = ';';
|
||||
$end_line = "\n";
|
||||
|
||||
foreach ($objectLines as $line) {
|
||||
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
|
||||
print $date . $separator;
|
||||
print $line->code_journal . $separator;
|
||||
if (empty($line->subledger_account)) {
|
||||
print length_accountg($line->numero_compte) . $separator;
|
||||
} else {
|
||||
print length_accounta($line->subledger_account) . $separator;
|
||||
}
|
||||
print $line->doc_ref . $separator;
|
||||
print $line->label_operation . $separator;
|
||||
print price($line->debit) . $separator;
|
||||
print price($line->credit) . $separator;
|
||||
|
||||
print $end_line;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export format : Configurable
|
||||
*
|
||||
|
||||
@@ -137,7 +137,7 @@ if ($object->id > 0)
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
$object->info($id);
|
||||
print dol_print_object_info($object, 1);
|
||||
dol_print_object_info($object, 1);
|
||||
|
||||
print '</div>';
|
||||
|
||||
@@ -151,9 +151,7 @@ if ($object->id > 0)
|
||||
$newcardbutton = '';
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id.'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id);
|
||||
}
|
||||
|
||||
if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) ))
|
||||
|
||||
@@ -1567,7 +1567,7 @@ else
|
||||
$formquestion=array();
|
||||
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false'));
|
||||
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
|
||||
print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ResiliateMember"), $langs->trans("ConfirmResiliateMember"), "confirm_resign", $formquestion, 'no', 1, 220);
|
||||
print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ResiliateMember"), $langs->trans("ConfirmResiliateMember"), "confirm_resign", $formquestion, 'no', 1, 240);
|
||||
}
|
||||
|
||||
// Confirm remove member
|
||||
|
||||
@@ -1279,7 +1279,8 @@ class Adherent extends CommonObject
|
||||
$this->login = $obj->login;
|
||||
$this->societe = $obj->company;
|
||||
$this->company = $obj->company;
|
||||
$this->fk_soc = $obj->fk_soc;
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->fk_soc = $obj->fk_soc; // For backward comaptibility
|
||||
$this->address = $obj->address;
|
||||
$this->zip = $obj->zip;
|
||||
$this->town = $obj->town;
|
||||
|
||||
@@ -65,7 +65,7 @@ class AdherentType extends CommonObject
|
||||
* @var string Adherent type label
|
||||
*/
|
||||
public $label;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Adherent type nature
|
||||
*/
|
||||
@@ -410,7 +410,7 @@ class AdherentType extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return translated label by the nature of a adherent (physical or moral)
|
||||
*
|
||||
@@ -422,7 +422,7 @@ class AdherentType extends CommonObject
|
||||
global $langs;
|
||||
if ($morphy == 'phy') { return $langs->trans("Physical"); }
|
||||
elseif ($morphy == 'mor') { return $langs->trans("Moral"); }
|
||||
else return $langs->trans("Physical & Morale");
|
||||
else return $langs->trans("Physical & Morale");
|
||||
//return $morphy;
|
||||
}
|
||||
|
||||
@@ -463,6 +463,7 @@ class AdherentType extends CommonObject
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
||||
*
|
||||
@@ -472,7 +473,7 @@ class AdherentType extends CommonObject
|
||||
* 2=Return key only (uid=qqq)
|
||||
* @return string DN
|
||||
*/
|
||||
private function _load_ldap_dn($info, $mode = 0)
|
||||
public function _load_ldap_dn($info, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@@ -485,12 +486,13 @@ class AdherentType extends CommonObject
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Initialize the info array (array of LDAP values) that will be used to call LDAP functions
|
||||
*
|
||||
* @return array Tableau info des attributs
|
||||
*/
|
||||
private function _load_ldap_info()
|
||||
public function _load_ldap_info()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
@@ -189,6 +189,42 @@ if (empty($reshook))
|
||||
$search_array_options=array();
|
||||
}
|
||||
|
||||
// Close
|
||||
if ($massaction == 'close' && $user->rights->adherent->creer)
|
||||
{
|
||||
$tmpmember = new Adherent($db);
|
||||
$error=0;
|
||||
$nbclose=0;
|
||||
|
||||
$db->begin();
|
||||
|
||||
foreach($toselect as $idtoclose)
|
||||
{
|
||||
$tmpmember->fetch($idtoclose);
|
||||
$result=$tmpmember->resiliate($user);
|
||||
|
||||
if ($result < 0 && ! count($tmpmember->errors))
|
||||
{
|
||||
setEventMessages($tmpmember->error, $tmpmember->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($result > 0) $nbclose++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessages($langs->trans("XMembersClosed", $nbclose), null, 'mesgs');
|
||||
|
||||
$db->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
// Mass actions
|
||||
$objectclass='Adherent';
|
||||
$objectlabel='Members';
|
||||
@@ -326,12 +362,11 @@ if ($search_type > 0)
|
||||
}
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
if ($sall != "") $param.="&sall=".urlencode($sall);
|
||||
if ($statut != "") $param.="&statut=".urlencode($statut);
|
||||
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
|
||||
if ($search_nom) $param.="&search_nom=".urlencode($search_nom);
|
||||
if ($search_civility) $param.="&search_civility=".urlencode($search_civility);
|
||||
if ($search_firstname) $param.="&search_firstname=".urlencode($search_firstname);
|
||||
if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname);
|
||||
@@ -358,6 +393,7 @@ $arrayofmassactions = array(
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($user->rights->adherent->creer) $arrayofmassactions['close']=$langs->trans("Resiliate");
|
||||
if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
@@ -365,9 +401,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMember').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create');
|
||||
}
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@@ -457,7 +491,7 @@ if (! empty($arrayfields['d.lastname']['checked']))
|
||||
if (! empty($arrayfields['d.gender']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
$arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
|
||||
$arraygender=array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
||||
print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@@ -151,8 +151,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Member").'</td><td>';
|
||||
$filter='s.client in (1,2,3)';
|
||||
print $form->select_company($id,'memberid',$filter,1);
|
||||
print $form->select_company($id,'memberid','',1);
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("User").'</td><td>';
|
||||
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
|
||||
@@ -247,9 +247,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/list.php?status=-1,1"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewSubscription').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/list.php?status=-1,1');
|
||||
}
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@@ -236,10 +236,8 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->configurer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/type.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMemberType').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewMemberType'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/type.php?action=create');
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@@ -143,7 +143,7 @@ print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input type="text" name="search_event" value="'.dol_escape_htmltag($search_event).'"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
// Action column
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
@@ -275,7 +275,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ if ($action == 'addthumb') // Regenerate thumbs
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
|
||||
dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_WARNING);
|
||||
dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_INFO);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -412,9 +412,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
}
|
||||
|
||||
// Logo
|
||||
print '<tr class="oddeven hideonsmartphone"><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
||||
print '<tr class="oddeven"><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||
print '<input type="file" class="flat class=minwidth200" name="logo" id="logo">';
|
||||
print '<input type="file" class="flat class=minwidth200" name="logo" id="logo" accept="image/*">';
|
||||
print '</td><td class="nocellnopadd right" valign="middle">';
|
||||
if (! empty($mysoc->logo_mini)) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
||||
@@ -798,9 +798,9 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Barcode
|
||||
|
||||
if (! empty($conf->barcode->enabled))
|
||||
{
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Gencod").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ print "</form>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
print $langs->trans("WebDAVSetupDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("WebDAVSetupDesc")."</span><br>\n";
|
||||
print "<br>";
|
||||
|
||||
|
||||
|
||||
@@ -77,10 +77,17 @@ $form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("DebugBarSetup"), $linkback, 'title_setup');
|
||||
print '<br>';
|
||||
|
||||
//print load_fiche_titre($langs->trans("DebugBar"));
|
||||
|
||||
if (! function_exists('mb_check_encoding'))
|
||||
{
|
||||
$langs->load("errors");
|
||||
print info_admin($langs->trans("ErrorPHPNeedModule", 'mbstring'), 0, 0, 'error');
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Level
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@@ -120,6 +120,12 @@ $modules=array(
|
||||
'img' => 'trip'
|
||||
)*/
|
||||
),
|
||||
'holiday' => array(
|
||||
array(
|
||||
'code' => 'MAIN_DELAY_HOLIDAYS',
|
||||
'img' => 'holiday'
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$labelmeteo = array(0=>$langs->trans("No"), 1=>$langs->trans("Yes"), 2=>$langs->trans("OnMobileOnly"));
|
||||
|
||||
@@ -33,8 +33,8 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectorfilter.class
|
||||
include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectoraction.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php';
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
if (!$user->admin) accessforbidden();
|
||||
if (empty($conf->emailcollector->enabled)) accessforbidden();
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "mails", "other"));
|
||||
@@ -608,9 +608,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
print '</td>';
|
||||
// Delete
|
||||
print '<td class="right">';
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editoperation&operationid='.$ruleaction['id'].'">'.img_edit().'</a>';
|
||||
print ' ';
|
||||
print '<td class="right nowraponall">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editoperation&operationid='.$ruleaction['id'].'">'.img_edit().'</a>';
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteoperation&operationid='.$ruleaction['id'].'">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
dol_include_once('/emailcollector/class/emailcollector.class.php');
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
if (empty($conf->emailcollector->enabled)) accessforbidden();
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "other"));
|
||||
@@ -321,9 +322,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
$newcardbutton='';
|
||||
//if ($user->rights->emailcollector->creer)
|
||||
//{
|
||||
$newcardbutton='<a class="butActionNew" href="emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']));
|
||||
//}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit);
|
||||
@@ -385,7 +384,7 @@ $parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
@@ -261,7 +261,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ else
|
||||
|
||||
if ($action == 'add' || GETPOST("modify"))
|
||||
{
|
||||
$external_rss_title = "external_rss_title_" . GETPOST("norss");
|
||||
$external_rss_urlrss = "external_rss_urlrss_" . GETPOST("norss");
|
||||
$external_rss_title = "external_rss_title_" . GETPOST("norss", 'int');
|
||||
$external_rss_urlrss = "external_rss_urlrss_" . GETPOST("norss", 'int');
|
||||
|
||||
if (! empty($_POST[$external_rss_urlrss]))
|
||||
{
|
||||
@@ -95,7 +95,7 @@ if ($action == 'add' || GETPOST("modify"))
|
||||
{
|
||||
// Ajoute boite box_external_rss dans definition des boites
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, note)";
|
||||
$sql.= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss").' ('.GETPOST($external_rss_title)).")')";
|
||||
$sql.= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss", 'int').' ('.GETPOST($external_rss_title, 'alpha')).")')";
|
||||
if (! $db->query($sql))
|
||||
{
|
||||
dol_print_error($db);
|
||||
@@ -103,8 +103,8 @@ if ($action == 'add' || GETPOST("modify"))
|
||||
}
|
||||
}
|
||||
|
||||
$result1=dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_" . GETPOST("norss"), GETPOST($external_rss_title), 'chaine', 0, '', $conf->entity);
|
||||
if ($result1) $result2=dolibarr_set_const($db, "EXTERNAL_RSS_URLRSS_" . GETPOST("norss"), GETPOST($external_rss_urlrss), 'chaine', 0, '', $conf->entity);
|
||||
$result1=dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_" . GETPOST("norss", 'int'), GETPOST($external_rss_title, 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
if ($result1) $result2=dolibarr_set_const($db, "EXTERNAL_RSS_URLRSS_" . GETPOST("norss", 'int'), GETPOST($external_rss_urlrss, 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if ($result1 && $result2)
|
||||
{
|
||||
@@ -122,13 +122,13 @@ if ($action == 'add' || GETPOST("modify"))
|
||||
|
||||
if ($_POST["delete"])
|
||||
{
|
||||
if(GETPOST("norss"))
|
||||
if (GETPOST("norss", 'int'))
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
// Supprime boite box_external_rss de definition des boites
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes_def";
|
||||
$sql.= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss"))." %'";
|
||||
$sql.= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss", 'int'))." %'";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
@@ -168,8 +168,8 @@ if ($_POST["delete"])
|
||||
}
|
||||
|
||||
|
||||
$result1=dolibarr_del_const($db, "EXTERNAL_RSS_TITLE_" . GETPOST("norss"), $conf->entity);
|
||||
if ($result1) $result2=dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_" . GETPOST("norss"), $conf->entity);
|
||||
$result1=dolibarr_del_const($db, "EXTERNAL_RSS_TITLE_".GETPOST("norss", 'int'), $conf->entity);
|
||||
if ($result1) $result2=dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_".GETPOST("norss", 'int'), $conf->entity);
|
||||
|
||||
if ($result1 && $result2)
|
||||
{
|
||||
@@ -270,13 +270,13 @@ if ($resql)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td width=\"100px\">".$langs->trans("Title")."</td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_" . $idrss . "\" value=\"" . $conf->global->$keyrsstitle . "\"></td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_" . $idrss . "\" value=\"" . dol_escape_htmltag($conf->global->$keyrsstitle) . "\"></td>";
|
||||
print "</tr>";
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("URL")."</td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_" . $idrss . "\" value=\"" . $conf->global->$keyrssurl . "\"></td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_" . $idrss . "\" value=\"" . dol_escape_htmltag($conf->global->$keyrssurl) . "\"></td>";
|
||||
print "</tr>";
|
||||
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2011-2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 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
|
||||
@@ -55,7 +55,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
if ($action == 'updateMask')
|
||||
{
|
||||
$maskconst = GETPOST('maskconstholidaty', 'alpha');
|
||||
$maskconst = GETPOST('maskconstholiday', 'alpha');
|
||||
$maskvalue = GETPOST('maskholiday', 'alpha');
|
||||
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
@@ -257,7 +257,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user');
|
||||
|
||||
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
||||
$link='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
||||
//$link.=$langs->trans("Disable");
|
||||
$link.=img_picto($langs->trans("Activated"), 'switch_on');
|
||||
$link.='</a>';
|
||||
|
||||
@@ -519,7 +519,7 @@ else
|
||||
{
|
||||
dol_fiche_head($head, 'common', '', -1);
|
||||
|
||||
print $langs->trans("EMailsDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@@ -396,7 +396,7 @@ else
|
||||
{
|
||||
dol_fiche_head($head, 'common_emailing', '', -1);
|
||||
|
||||
print $langs->trans("EMailsDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@@ -356,7 +356,7 @@ $parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
@@ -256,9 +256,7 @@ if ($action == 'delete')
|
||||
$newcardbutton='';
|
||||
if ($user->admin)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'&backtopage='.urlencode($_SERVER['PHP_SELF']));
|
||||
}
|
||||
|
||||
print '<form name="newmenu" class="nocellnopadd" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@@ -709,8 +709,8 @@ if ($mode == 'common')
|
||||
{
|
||||
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) print $langs->trans("Used");
|
||||
else {
|
||||
print img_picto($langs->trans("Required"), 'switch_on');
|
||||
print $langs->trans("Required");
|
||||
print img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium');
|
||||
//print $langs->trans("Required");
|
||||
}
|
||||
if (! empty($conf->multicompany->enabled) && $user->entity) $disableSetup++;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", $_POST["MAIN_PROFID5_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID6_IN_ADDRESS", $_POST["MAIN_PROFID6_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", $_POST["MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"], 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", $_POST["MAIN_TVAINTRA_NOT_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
@@ -177,76 +179,25 @@ if ($action == 'edit') // Edit
|
||||
print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS', (! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Show prof id 1 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
// Show prof id in address into pdf
|
||||
for($i=1; $i<=6; $i++)
|
||||
{
|
||||
$pid1=$langs->transcountry("ProfId1", $mysoc->country_code);
|
||||
if ($pid1 == '-') $pid1=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid1 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid1)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
|
||||
print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS', isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 2 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid2=$langs->transcountry("ProfId2", $mysoc->country_code);
|
||||
if ($pid2 == '-') $pid2=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid2 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid2)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
|
||||
print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS', isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 3 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid3=$langs->transcountry("ProfId3", $mysoc->country_code);
|
||||
if ($pid3 == '-') $pid3=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid3 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid3)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
|
||||
print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS', isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 4 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid4=$langs->transcountry("ProfId4", $mysoc->country_code);
|
||||
if ($pid4 == '-') $pid4=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid4 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid4)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
|
||||
print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS', isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid=$langs->transcountry("ProfId".$i, $mysoc->country_code);
|
||||
if ($pid == '-') $pid=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid.'</td><td>';
|
||||
$keyforconstant = 'MAIN_PROFID'.$i.'_IN_ADDRESS';
|
||||
print $form->selectyesno($keyforconstant, isset($conf->global->$keyforconstant)?$conf->global->$keyforconstant:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@@ -419,77 +370,26 @@ else // Show
|
||||
print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Show prof id 1 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid1=$langs->transcountry("ProfId1", $mysoc->country_code);
|
||||
if ($pid1 == '-') $pid1=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid1 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid1)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
|
||||
print yn($conf->global->MAIN_PROFID1_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 2 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid2=$langs->transcountry("ProfId2", $mysoc->country_code);
|
||||
if ($pid2 == '-') $pid2=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid2 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid2)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
|
||||
print yn($conf->global->MAIN_PROFID2_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 3 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid3=$langs->transcountry("ProfId3", $mysoc->country_code);
|
||||
if ($pid3 == '-') $pid3=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid3 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid3)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
|
||||
print yn($conf->global->MAIN_PROFID3_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 4 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid4=$langs->transcountry("ProfId4", $mysoc->country_code);
|
||||
if ($pid4 == '-') $pid4=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid4 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid4)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
|
||||
print yn($conf->global->MAIN_PROFID4_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
// Show prof id in address into pdf
|
||||
for ($i=1; $i<=6; $i++)
|
||||
{
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid=$langs->transcountry("ProfId".$i, $mysoc->country_code);
|
||||
if ($pid == '-') $pid=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid.'</td><td>';
|
||||
$keyforconstant = 'MAIN_PROFID'.$i.'_IN_ADDRESS';
|
||||
print yn($conf->global->$keyforconstant, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
@@ -314,7 +314,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/confexped.php
|
||||
* \ingroup produit
|
||||
* \file htdocs/admin/reception_setup.php
|
||||
* \ingroup reception
|
||||
* \brief Page to setup reception module
|
||||
*/
|
||||
|
||||
@@ -27,13 +27,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("receptions");
|
||||
$langs->load('other');
|
||||
$langs->loadLangs(array("admin", "receptions", 'other'));
|
||||
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$value=GETPOST('value', 'alpha');
|
||||
@@ -225,7 +222,7 @@ clearstatcache();
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/reception/");
|
||||
|
||||
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$handle = opendir($dir);
|
||||
@@ -269,7 +266,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -64,10 +64,10 @@ if ($action == 'update' || $action == 'add')
|
||||
$constnote=$_POST["constnote"][$key];
|
||||
|
||||
$res=dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
@@ -123,9 +123,9 @@ $head = mailmanspip_admin_prepare_head();
|
||||
if (! empty($conf->global->ADHERENT_USE_SPIP))
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
|
||||
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
||||
|
||||
|
||||
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_SPIP">';
|
||||
//$link.=$langs->trans("Disable");
|
||||
@@ -141,25 +141,25 @@ if (! empty($conf->global->ADHERENT_USE_SPIP))
|
||||
|
||||
print load_fiche_titre($langs->trans('SPIPTitle'), $link, '');
|
||||
print '<br>';
|
||||
|
||||
|
||||
form_constantes($constantes, 2);
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Update").'" name="update"></div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
||||
|
||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_SPIP">';
|
||||
|
||||
$link='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_SPIP">';
|
||||
//$link.=$langs->trans("Activate");
|
||||
$link.=img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
$link.='</a>';
|
||||
print load_fiche_titre($langs->trans('SPIPTitle'), $link, '');
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@@ -276,7 +276,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
// TODO We add/delete permission here until permission can have a condition on a global var
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
||||
$newmodule=new modFournisseur($db);
|
||||
|
||||
|
||||
if ($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)
|
||||
{
|
||||
// clear default rights array
|
||||
@@ -191,7 +191,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
$newmodule->rights[$r][3] = 0;
|
||||
$newmodule->rights[$r][4] = 'commande';
|
||||
$newmodule->rights[$r][5] = 'approve2';
|
||||
|
||||
|
||||
// Insert
|
||||
$newmodule->insert_permissions(1);
|
||||
}
|
||||
@@ -199,7 +199,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
{
|
||||
// Remove all rights with Permission1190
|
||||
$newmodule->delete_permissions();
|
||||
|
||||
|
||||
// Add all right without Permission1190
|
||||
$newmodule->insert_permissions(1);
|
||||
}
|
||||
@@ -306,7 +306,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -36,7 +36,13 @@ $action=GETPOST('action', 'alpha');
|
||||
|
||||
if ($action == 'convert')
|
||||
{
|
||||
$db->query("alter table ".$_GET["table"]." ENGINE=INNODB");
|
||||
$sql="ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." ENGINE=INNODB";
|
||||
$db->query($sql);
|
||||
}
|
||||
if ($action == 'convertutf8')
|
||||
{
|
||||
$sql="ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." CHARACTER SET utf8 COLLATE utf8_unicode_ci";
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,23 +117,28 @@ else
|
||||
|
||||
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a></td>';
|
||||
print '<td>'.$obj->Engine.'</td>';
|
||||
if (isset($row[1]) && $row[1] == "MyISAM")
|
||||
if (isset($obj->Engine) && $obj->Engine == "MyISAM")
|
||||
{
|
||||
print '<td><a href="database-tables.php?action=convert&table='.$row[0].'">'.$langs->trans("Convert").'</a></td>';
|
||||
print '<td><a class="reposition" href="database-tables.php?action=convert&table='.$obj->Name.'">'.$langs->trans("Convert").' InnoDB</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print '<td>'.$obj->Row_format.'</td>';
|
||||
print '<td class="right">'.$obj->Rows.'</td>';
|
||||
print '<td class="right">'.$obj->Avg_row_length.'</td>';
|
||||
print '<td class="right">'.$obj->Data_length.'</td>';
|
||||
print '<td class="right">'.$obj->Max_data_length.'</td>';
|
||||
print '<td class="right">'.$obj->Index_length.'</td>';
|
||||
print '<td class="right">'.$obj->Auto_increment.'</td>';
|
||||
print '<td class="right">'.$obj->Check_time.'</td>';
|
||||
print '<td class="right">'.$obj->Collation.'</td>';
|
||||
print '<td align="right">'.$obj->Rows.'</td>';
|
||||
print '<td align="right">'.$obj->Avg_row_length.'</td>';
|
||||
print '<td align="right">'.$obj->Data_length.'</td>';
|
||||
print '<td align="right">'.$obj->Max_data_length.'</td>';
|
||||
print '<td align="right">'.$obj->Index_length.'</td>';
|
||||
print '<td align="right">'.$obj->Auto_increment.'</td>';
|
||||
print '<td align="right">'.$obj->Check_time.'</td>';
|
||||
print '<td align="right">'.$obj->Collation;
|
||||
if (isset($obj->Collation) && ($obj->Collation == "utf8mb4_general_ci" || $obj->Collation == "utf8mb4_unicode_ci"))
|
||||
{
|
||||
print '<br><a class="reposition" href="database-tables.php?action=convertutf8&table='.$obj->Name.'">'.$langs->trans("Convert").' UTF8</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ foreach ($dirmodels as $reldir) {
|
||||
if ($conf->global->TICKET_ADDON == 'mod_' . $classname) {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmod&value=mod_' . $classname . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=setmod&value=mod_' . $classname . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ $export_type=GETPOST('export_type', 'alpha');
|
||||
$file=GETPOST('zipfilename_template', 'alpha');
|
||||
$compression = GETPOST('compression');
|
||||
|
||||
$file = dol_sanitizeFileName($file);
|
||||
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
$page = GETPOST("page", 'int');
|
||||
@@ -57,10 +59,11 @@ $errormsg='';
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
|
||||
$ret=dol_delete_file($file, 1);
|
||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
|
||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
|
||||
$filerelative = dol_sanitizeFileName(GETPOST('urlfile', 'alpha'));
|
||||
$filepath=$conf->admin->dir_output.'/'.$filerelative;
|
||||
$ret=dol_delete_file($filepath, 1);
|
||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", $filerelative), null, 'mesgs');
|
||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", $filerelative), null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ if ($result)
|
||||
//print '<input class="flat" type="text" size="10" name="search_desc" value="'.$search_desc.'">';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
@@ -34,9 +34,11 @@ if (! $user->admin) accessforbidden();
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (preg_match('/set(.*)/', $action, $reg))
|
||||
{
|
||||
if (! dolibarr_set_const($db, $reg[1], '1', 'chaine', 0, '', $conf->entity) > 0)
|
||||
@@ -47,7 +49,7 @@ if (preg_match('/set(.*)/', $action, $reg))
|
||||
|
||||
if (preg_match('/del(.*)/', $action, $reg))
|
||||
{
|
||||
if (! dolibarr_del_const($db, $reg[1], $conf->entity) > 0)
|
||||
if (! dolibarr_set_const($db, $reg[1], '0', 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
@@ -87,7 +89,7 @@ $workflowcodes=array(
|
||||
// Automatic classification supplier order
|
||||
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array('family'=>'classify_supplier_order', 'position'=>62, 'enabled'=>'! empty($conf->fournisseur->enabled)', 'picto'=>'order','warning'=>''),
|
||||
//Automatic classification reception
|
||||
'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>30, 'enabled'=>'! empty($conf->reception->enabled) && ! empty($conf->fournisseur->enabled)', 'picto'=>'bill'),
|
||||
'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>64, 'enabled'=>'! empty($conf->reception->enabled) && ! empty($conf->fournisseur->enabled)', 'picto'=>'bill'),
|
||||
);
|
||||
|
||||
if (! empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow']))
|
||||
@@ -169,13 +171,13 @@ foreach($workflowcodes as $key => $params)
|
||||
{
|
||||
if (! empty($conf->global->$key))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del'.$key.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=del'.$key.'">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set'.$key.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=set'.$key.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@@ -108,13 +108,13 @@ print '<td>'.$langs->trans("ApiProductionMode").'</td>';
|
||||
$production_mode=(empty($conf->global->API_PRODUCTION_MODE)?false:true);
|
||||
if ($production_mode)
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setproductionmode&value='.($i+1).'&status=0">';
|
||||
print '<td align="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setproductionmode&value='.($i+1).'&status=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setproductionmode&value='.($i+1).'&status=1">';
|
||||
print '<td align="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setproductionmode&value='.($i+1).'&status=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ $parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
248
htdocs/bom/bom_agenda.php
Normal file
248
htdocs/bom/bom_agenda.php
Normal file
@@ -0,0 +1,248 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/modulebuilder/template/myobject_agenda.php
|
||||
* \ingroup bom
|
||||
* \brief Page of MyObject events
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mrp","other"));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
if (GETPOST('actioncode', 'array'))
|
||||
{
|
||||
$actioncode=GETPOST('actioncode', 'array', 3);
|
||||
if (! count($actioncode)) $actioncode='0';
|
||||
}
|
||||
else
|
||||
{
|
||||
$actioncode=GETPOST("actioncode", "alpha", 3)?GETPOST("actioncode", "alpha", 3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
||||
}
|
||||
$search_agenda_label=GETPOST('search_agenda_label');
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->societe_id > 0) access_forbidden();
|
||||
//if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
//$result = restrictedArea($user, 'bom', $id);
|
||||
|
||||
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$page = GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield='a.datep,a.id';
|
||||
if (! $sortorder) $sortorder='DESC';
|
||||
|
||||
// Initialize technical objects
|
||||
$object=new BOM($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction=$conf->bom->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('bomagenda','globalcard')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('bom');
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
if ($id > 0 || ! empty($ref)) $upload_dir = $conf->bom->multidir_output[$object->entity] . "/" . $object->id;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array('id'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Cancel
|
||||
if (GETPOST('cancel', 'alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$actioncode='';
|
||||
$search_agenda_label='';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$contactstatic = new Contact($db);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$title=$langs->trans("Agenda");
|
||||
//if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
|
||||
$help_url = '';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
||||
$head = bomPrepareHead($object);
|
||||
|
||||
|
||||
dol_fiche_head($head, 'agenda', $langs->trans("BillOfMaterials"), -1, 'bom');
|
||||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="' .dol_buildpath('/bom/myobject_list.php', 1) . '?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
/*
|
||||
// Ref customer
|
||||
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
if ($user->rights->bom->creer)
|
||||
{
|
||||
if ($action != 'classify')
|
||||
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||
$morehtmlref.=' : ';
|
||||
if ($action == 'classify') {
|
||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||
$morehtmlref.='</form>';
|
||||
} else {
|
||||
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||
}
|
||||
} else {
|
||||
if (! empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
$proj->fetch($object->fk_project);
|
||||
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||
$morehtmlref.=$proj->ref;
|
||||
$morehtmlref.='</a>';
|
||||
} else {
|
||||
$morehtmlref.='';
|
||||
}
|
||||
}
|
||||
}*/
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
$object->info($object->id);
|
||||
dol_print_object_info($object, 1);
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
|
||||
// Actions buttons
|
||||
|
||||
$objthirdparty=$object;
|
||||
$objcon=new stdClass();
|
||||
|
||||
$out='';
|
||||
$permok=$user->rights->agenda->myactions->create;
|
||||
if ((! empty($objthirdparty->id) || ! empty($objcon->id)) && $permok)
|
||||
{
|
||||
//$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
if (get_class($objthirdparty) == 'Societe') $out.='&socid='.$objthirdparty->id;
|
||||
$out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1';
|
||||
//$out.=$langs->trans("AddAnAction").' ';
|
||||
//$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||
//$out.="</a>";
|
||||
}
|
||||
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create))
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) ))
|
||||
{
|
||||
$param='&socid='.$socid;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
|
||||
//print load_fiche_titre($langs->trans("ActionsOnBom"), '', '');
|
||||
|
||||
// List of all actions
|
||||
$filters=array();
|
||||
$filters['search_agenda_label']=$search_agenda_label;
|
||||
|
||||
// TODO Replace this with same code than into list.php
|
||||
//show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@@ -307,10 +307,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">'."\n";
|
||||
print '<table class="border centpercent tableforfield">'."\n";
|
||||
|
||||
// Common attributes
|
||||
//$keyforbreak='fieldkeytoswithonsecondcolumn';
|
||||
$keyforbreak='description';
|
||||
include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
|
||||
|
||||
// Other attributes
|
||||
@@ -325,6 +325,62 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Lines
|
||||
*/
|
||||
|
||||
if (! empty($object->table_element_line))
|
||||
{
|
||||
// Show object lines
|
||||
$result = $object->getLinesArray();
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid', 'int')) . '" method="POST">
|
||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
|
||||
<input type="hidden" name="mode" value="">
|
||||
<input type="hidden" name="id" value="' . $object->id . '">
|
||||
';
|
||||
|
||||
if (! empty($conf->use_javascript_ajax) && $object->status == 0) {
|
||||
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')
|
||||
{
|
||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
||||
}
|
||||
|
||||
if (! empty($object->lines))
|
||||
{
|
||||
// $ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
}
|
||||
|
||||
// Form to add new line
|
||||
if ($object->status == 0 && $permissiontoadd && $action != 'selectlines')
|
||||
{
|
||||
if ($action != 'editline')
|
||||
{
|
||||
// Add products/services form
|
||||
// $object->formAddObjectLine(1, $mysoc, $soc);
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')
|
||||
{
|
||||
print '</table>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
print "</form>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Buttons for actions
|
||||
if ($action != 'presend' && $action != 'editline') {
|
||||
print '<div class="tabsAction">'."\n";
|
||||
@@ -335,7 +391,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Send
|
||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
|
||||
//print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
|
||||
|
||||
// Modify
|
||||
if ($user->rights->bom->write)
|
||||
|
||||
@@ -68,8 +68,8 @@ $extralabels = $extrafields->fetch_name_optionals_label('bom');
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/bom/" . dol_sanitizeFileName($object->id);
|
||||
if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/bom/" . dol_sanitizeFileName($object->ref);
|
||||
//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->bom->multidir_output[$object->entity?$object->entity:1] . "/bom/" . dol_sanitizeFileName($object->id);
|
||||
if ($id > 0 || ! empty($ref)) $upload_dir = $conf->bom->multidir_output[$object->entity?$object->entity:1] . "/bom/" . dol_sanitizeFileName($object->ref);
|
||||
|
||||
|
||||
/*
|
||||
@@ -117,7 +117,7 @@ if ($object->id)
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Number of files
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
@@ -132,10 +132,8 @@ if ($object->id)
|
||||
dol_fiche_end();
|
||||
|
||||
$modulepart = 'bom';
|
||||
//$permission = $user->rights->bom->create;
|
||||
$permission = 1;
|
||||
//$permtoedit = $user->rights->bom->create;
|
||||
$permtoedit = 1;
|
||||
$permission = $user->rights->bom->write;
|
||||
$permtoedit = $user->rights->bom->write;
|
||||
$param = '&id=' . $object->id;
|
||||
|
||||
//$relativepathwithnofile='bom/' . dol_sanitizeFileName($object->id).'/';
|
||||
|
||||
@@ -387,7 +387,7 @@ $parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file class/bom.class.php
|
||||
* \file bom/class/bom.class.php
|
||||
* \ingroup bom
|
||||
* \brief This file is a CRUD class file for BOM (Create/Read/Update/Delete)
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ class BOM extends CommonObject
|
||||
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>-1, 'position'=>62, 'notnull'=>-1,),
|
||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,),
|
||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,),
|
||||
'date_valid' => array('type'=>'datetime', 'label'=>'DateValid', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,),
|
||||
'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,),
|
||||
'fk_user_creat' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'llx_user.rowid',),
|
||||
'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,),
|
||||
'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>512, 'notnull'=>0,),
|
||||
@@ -850,6 +850,31 @@ class BOM extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an array of lines
|
||||
*
|
||||
* @return array|int array of lines if OK, <0 if KO
|
||||
*/
|
||||
public function getLinesArray()
|
||||
{
|
||||
$this->lines=array();
|
||||
|
||||
$objectline = new BOMLine($this->db);
|
||||
$result = $objectline->fetchAll('', '', 0, 0, array('fk_bom'=>$this->id));
|
||||
|
||||
if (is_numeric($result))
|
||||
{
|
||||
$this->error = $this->error;
|
||||
$this->errors = $this->errors;
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lines = $result;
|
||||
return $this->lines();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise object with example values
|
||||
* Id must be 0 if object instance is a specimen
|
||||
|
||||
@@ -82,12 +82,8 @@ $userstatic=new User($db);
|
||||
llxHeader('', $langs->trans("ListOfBookmarks"));
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->bookmark->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewBookmark').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewBookmark'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer));
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton);
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td width=\"50%\">'.$langs->trans("CashDeskThirdPartyForSell").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY, 'socid', 's.client in (1,3) AND s.status = 1', 1, 0, 0, array(), 0);
|
||||
print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY, 'socid', '(s.client in (1,3) AND s.status = 1)', 1, 0, 0, array(), 0);
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
|
||||
@@ -49,11 +49,11 @@ switch($action)
|
||||
// Recuperation des donnees en fonction de la source (liste deroulante ou champ texte) ...
|
||||
if ( $_POST['hdnSource'] == 'LISTE' )
|
||||
{
|
||||
$sql.= " AND p.rowid = ".$_POST['selProduit'];
|
||||
$sql.= " AND p.rowid = ".((int) GETPOST('selProduit', 'int'));
|
||||
}
|
||||
elseif ( $_POST['hdnSource'] == 'REF' )
|
||||
{
|
||||
$sql.= " AND p.ref = '".$_POST['txtRef']."'";
|
||||
$sql.= " AND p.ref = '".$db->escape(GETPOST('txtRef', 'alpha'))."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@@ -134,7 +134,7 @@ print '<td>';
|
||||
$disabled=0;
|
||||
$langs->load("companies");
|
||||
if (! empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled=1; // If a particular third party is defined, we disable choice
|
||||
print $form->select_company(GETPOST('socid', 'int')?GETPOST('socid', 'int'):$conf->global->CASHDESK_ID_THIRDPARTY, 'socid', 's.client in (1,3) AND s.status = 1', !$disabled, $disabled, 1);
|
||||
print $form->select_company(GETPOST('socid', 'int')?GETPOST('socid', 'int'):$conf->global->CASHDESK_ID_THIRDPARTY, 'socid', '(s.client IN (1,3) AND s.status = 1)', !$disabled, $disabled, 1);
|
||||
//print '<input name="warehouse_id" class="texte_login" type="warehouse_id" value="" />';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -55,17 +55,6 @@ $langs->loadLangs(array("main","bills","cashdesk"));
|
||||
onfocus="javascript: this.select();" />
|
||||
</td>
|
||||
<td class="select_design maxwidthonsmartphone">
|
||||
<?php /*
|
||||
$selected='';
|
||||
$htmlname='idprod';
|
||||
$status=-1;
|
||||
$rice_level=$company->price_level;
|
||||
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', 'outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
|
||||
if (! $hidelabel) print $langs->trans("RefOrLabel").' : ';
|
||||
print '<input type="text" size="4" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'" />';
|
||||
*/
|
||||
?>
|
||||
|
||||
<select id="selProduit" class="maxwidthonsmartphone" name="selProduit" onchange="javascript: setSource('LISTE');">
|
||||
<?php
|
||||
print '<option value="0">'.$top_liste_produits.'</option>'."\n";
|
||||
|
||||
@@ -78,7 +78,7 @@ print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname
|
||||
print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
|
||||
print '<form id="frmThirdparty" class="formulaire1 inline-block" method="post" action="facturation_verif.php?action=change_thirdparty">';
|
||||
print $langs->trans("CashDeskThirdParty").': ';
|
||||
print $form->select_company($_SESSION["CASHDESK_ID_THIRDPARTY"], 'CASHDESK_ID_THIRDPARTY', 's.client IN (1,3) AND s.status = 1', '', 0, 0, null, 0, 'valignmiddle inline-block');
|
||||
print $form->select_company($_SESSION["CASHDESK_ID_THIRDPARTY"], 'CASHDESK_ID_THIRDPARTY', '(s.client IN (1,3) AND s.status = 1)', '', 0, 0, null, 0, 'valignmiddle inline-block');
|
||||
print '<input class="button bouton_change_thirdparty inline-block valignmiddle" type="submit" id="bouton_change_thirdparty" value="'.$langs->trans("Modify").'">';
|
||||
//print $companyLink;
|
||||
print '<br>';
|
||||
|
||||
@@ -65,9 +65,7 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css')
|
||||
|
||||
llxHeader('', $title, '', '', 0, 0, $arrayofjs, $arrayofcss);
|
||||
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewCategory").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type));
|
||||
|
||||
print load_fiche_titre($title, $newcardbutton);
|
||||
|
||||
|
||||
@@ -95,6 +95,20 @@ class ActionComm extends CommonObject
|
||||
*/
|
||||
public $datec;
|
||||
|
||||
/**
|
||||
* Date end record (datef)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $datef;
|
||||
|
||||
/**
|
||||
* Duration (duree)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $duree;
|
||||
|
||||
/**
|
||||
* Date modification record (tms)
|
||||
*
|
||||
|
||||
@@ -435,9 +435,7 @@ if ($resql)
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec='100000';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')));
|
||||
}
|
||||
|
||||
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit);
|
||||
|
||||
@@ -367,9 +367,7 @@ if ($user->rights->agenda->myactions->create || $user->rights->agenda->allaction
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec='100000';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')));
|
||||
}
|
||||
|
||||
$link='';
|
||||
|
||||
@@ -245,7 +245,7 @@ if ($object->id > 0)
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Prospect/Customer
|
||||
print '<tr><td class="titlefield">'.$langs->trans('ProspectCustomer').'</td><td>';
|
||||
@@ -534,7 +534,7 @@ if ($object->id > 0)
|
||||
print '<br>';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Level of prospect
|
||||
print '<tr><td class="titlefield nowrap">';
|
||||
|
||||
@@ -471,13 +471,13 @@ if (empty($reshook))
|
||||
if ($result)
|
||||
{
|
||||
setEventMessages($langs->trans("MailSuccessfulySent", $mailfile->getValidAddress($object->email_from, 2), $mailfile->getValidAddress($object->sendto, 2)), null, 'mesgs');
|
||||
$action = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("ResultKo").'<br>'.$mailfile->error.' '.$result, null, 'errors');
|
||||
$action = 'test';
|
||||
}
|
||||
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ if ($action == 'create')
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border centpercent">';
|
||||
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTitle").'</td><td><input class="flat minwidth300" name="titre" value="'.dol_escape_htmltag(GETPOST('titre')).'" autofocus="autofocus"></td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("MailFrom").'</td><td><input class="flat minwidth200" name="from" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td><input class="flat minwidth200" name="errorsto" value="'.(!empty($conf->global->MAILING_EMAIL_ERRORSTO)?$conf->global->MAILING_EMAIL_ERRORSTO:$conf->global->MAIN_MAIL_ERRORS_TO).'"></td></tr>';
|
||||
@@ -893,7 +893,7 @@ else
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Description
|
||||
print '<tr><td class="titlefield">'.$form->editfieldkey("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string').'</td><td colspan="3">';
|
||||
|
||||
@@ -130,13 +130,12 @@ if ($action == 'delete')
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if (!empty($id))
|
||||
if (! empty($id))
|
||||
{
|
||||
$obj = new MailingTargets($db);
|
||||
$obj->update_nb($id);
|
||||
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||
exit;
|
||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -196,7 +195,7 @@ if ($object->fetch($id) >= 0)
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
||||
|
||||
@@ -432,7 +431,6 @@ if ($object->fetch($id) >= 0)
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$param = "&id=".$object->id;
|
||||
@@ -471,7 +469,7 @@ if ($object->fetch($id) >= 0)
|
||||
if ($page) $param.= "&page=".$page;
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
// Ligne des champs de filtres
|
||||
print '<tr class="liste_titre_filter">';
|
||||
@@ -505,7 +503,7 @@ if ($object->fetch($id) >= 0)
|
||||
print $formmailing->selectDestinariesStatus($search_dest_status, 'search_dest_status', 1);
|
||||
print '</td>';
|
||||
// Action column
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@@ -533,6 +531,15 @@ if ($object->fetch($id) >= 0)
|
||||
|
||||
if ($num)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$objectstaticmember=new Adherent($db);
|
||||
$objectstaticuser=new User($db);
|
||||
$objectstaticcompany=new Societe($db);
|
||||
$objectstaticcontact=new Contact($db);
|
||||
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
@@ -551,32 +558,23 @@ if ($object->fetch($id) >= 0)
|
||||
{
|
||||
if ($obj->source_type == 'member')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$objectstatic=new Adherent($db);
|
||||
$objectstatic->fetch($obj->source_id);
|
||||
print $objectstatic->getNomUrl(1);
|
||||
$objectstaticmember->fetch($obj->source_id);
|
||||
print $objectstaticmember->getNomUrl(1);
|
||||
}
|
||||
elseif ($obj->source_type == 'user')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
$objectstatic=new User($db);
|
||||
$objectstatic->fetch($obj->source_id);
|
||||
$objectstatic->id=$obj->source_id;
|
||||
print $objectstatic->getNomUrl(1);
|
||||
$objectstaticuser->fetch($obj->source_id);
|
||||
print $objectstaticuser->getNomUrl(1);
|
||||
}
|
||||
elseif ($obj->source_type == 'thirdparty')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
$objectstatic=new Societe($db);
|
||||
$objectstatic->fetch($obj->source_id);
|
||||
print $objectstatic->getNomUrl(1);
|
||||
$objectstaticcompany->fetch($obj->source_id);
|
||||
print $objectstaticcompany->getNomUrl(1);
|
||||
}
|
||||
elseif ($obj->source_type == 'contact')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$objectstatic=new Contact($db);
|
||||
$objectstatic->fetch($obj->source_id);
|
||||
print $objectstatic->getNomUrl(1);
|
||||
$objectstaticcontact->fetch($obj->source_id);
|
||||
print $objectstaticcontact->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -605,7 +603,7 @@ if ($object->fetch($id) >= 0)
|
||||
if ($obj->statut == 0) // Not sent yet
|
||||
{
|
||||
if ($user->rights->mailing->creer && $allowaddtarget) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=delete&rowid='.$obj->rowid.$param.'">'.img_delete($langs->trans("RemoveRecipient")).'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=delete&rowid='.$obj->rowid.$param.'">'.img_delete($langs->trans("RemoveRecipient")).'</a>';
|
||||
}
|
||||
}
|
||||
/*if ($obj->statut == -1) // Sent with error
|
||||
|
||||
@@ -156,9 +156,7 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->mailing->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/mailing/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMailing').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewMailing'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/mailing/card.php?action=create');
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
@@ -193,7 +191,7 @@ if ($result)
|
||||
if (! $filteremail) print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
@@ -1679,7 +1679,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Project") . '</td><td>';
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@@ -2421,10 +2421,15 @@ $formquestion = array_merge($formquestion, array(
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
||||
if (! empty($object->lines) || ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines' && $action != 'editline'))
|
||||
{
|
||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
||||
}
|
||||
|
||||
if (! empty($object->lines))
|
||||
{
|
||||
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
}
|
||||
|
||||
// Form to add new line
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines')
|
||||
@@ -2439,16 +2444,21 @@ $formquestion = array_merge($formquestion, array(
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
if (! empty($object->lines) || ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines' && $action != 'editline'))
|
||||
{
|
||||
print '</table>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
/*
|
||||
* Boutons Actions
|
||||
* Button Actions
|
||||
*/
|
||||
|
||||
if ($action != 'presend') {
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref', 'alpha'):GETPOST('search_ref', '
|
||||
$search_refcustomer=GETPOST('search_refcustomer', 'alpha');
|
||||
|
||||
$search_refproject=GETPOST('search_refproject', 'alpha');
|
||||
$search_project=GETPOST('search_project', 'alpha');
|
||||
|
||||
$search_societe=GETPOST('search_societe', 'alpha');
|
||||
$search_montant_ht=GETPOST('search_montant_ht', 'alpha');
|
||||
@@ -144,27 +145,28 @@ if (empty($user->socid)) $fieldstosearchall["p.note_private"]="NotePrivate";
|
||||
|
||||
$checkedtypetiers=0;
|
||||
$arrayfields=array(
|
||||
'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||
'p.ref_client'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1),
|
||||
'pr.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
||||
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers),
|
||||
'p.date'=>array('label'=>$langs->trans("Date"), 'checked'=>1),
|
||||
'p.fin_validite'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1),
|
||||
'p.date_livraison'=>array('label'=>$langs->trans("DeliveryDate"), 'checked'=>0),
|
||||
'ava.rowid'=>array('label'=>$langs->trans("AvailabilityPeriod"), 'checked'=>0),
|
||||
'p.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
|
||||
'p.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
||||
'p.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0),
|
||||
'u.login'=>array('label'=>$langs->trans("Author"), 'checked'=>1, 'position'=>10),
|
||||
'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1),
|
||||
'p.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
||||
'p.ref'=>array('label'=>"Ref", 'checked'=>1),
|
||||
'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1),
|
||||
'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)),
|
||||
'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>1),
|
||||
's.zip'=>array('label'=>"Zip", 'checked'=>1),
|
||||
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
|
||||
'p.date'=>array('label'=>"Date", 'checked'=>1),
|
||||
'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1),
|
||||
'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0),
|
||||
'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0),
|
||||
'p.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
|
||||
'p.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0),
|
||||
'p.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0),
|
||||
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10),
|
||||
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>1),
|
||||
'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
||||
'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
||||
);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
@@ -197,6 +199,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_ref='';
|
||||
$search_refcustomer='';
|
||||
$search_refproject='';
|
||||
$search_project='';
|
||||
$search_societe='';
|
||||
$search_montant_ht='';
|
||||
$search_montant_vat='';
|
||||
@@ -265,13 +268,12 @@ $sql.= " ava.rowid as availability,";
|
||||
$sql.= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql.= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
|
||||
$sql.= ' p.datec as date_creation, p.tms as date_update,';
|
||||
$sql.= " pr.rowid as project_id, pr.ref as project_ref,";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
||||
$sql.= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,";
|
||||
$sql.= ' u.login';
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user,";
|
||||
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||
@@ -310,6 +312,7 @@ if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search
|
||||
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
|
||||
if ($search_refcustomer) $sql .= natural_search('p.ref_client', $search_refcustomer);
|
||||
if ($search_refproject) $sql .= natural_search('pr.ref', $search_refproject);
|
||||
if ($search_project) $sql .= natural_search('pr.title', $search_project);
|
||||
if ($search_availability) $sql .= " AND p.fk_availability IN (".$db->escape($search_availability).')';
|
||||
|
||||
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
||||
@@ -426,9 +429,9 @@ if ($resql)
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
if ($user->rights->propal->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if ($user->rights->propal->cloturer) $arrayofmassactions['closed']=$langs->trans("Close");
|
||||
@@ -438,10 +441,8 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->propal->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewPropal').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/propal/card.php?action=create');
|
||||
}
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@@ -537,19 +538,25 @@ if ($resql)
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.dol_escape_htmltag($search_refcustomer).'">';
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['pr.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refproject" value="'.dol_escape_htmltag($search_refproject).'">';
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['pr.title']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_project" value="'.dol_escape_htmltag($search_project).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="10" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>';
|
||||
if (! empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="4" name="search_zip" value="'.$search_zip.'"></td>';
|
||||
@@ -687,7 +694,8 @@ if ($resql)
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['p.ref_client']['checked'])) print_liste_field_titre($arrayfields['p.ref_client']['label'], $_SERVER["PHP_SELF"], 'p.ref_client', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['pr.ref']['checked'])) print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], 'pr.ref', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['pr.ref']['checked'])) print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], 'pr.ref', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['pr.title']['checked'])) print_liste_field_titre($arrayfields['pr.title']['label'], $_SERVER["PHP_SELF"], 'pr.title', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
|
||||
@@ -725,6 +733,16 @@ if ($resql)
|
||||
$objectstatic->id=$obj->rowid;
|
||||
$objectstatic->ref=$obj->ref;
|
||||
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->client=$obj->client;
|
||||
$companystatic->code_client=$obj->code_client;
|
||||
$companystatic->email=$obj->email;
|
||||
|
||||
$projectstatic->id=$obj->project_id;
|
||||
$projectstatic->ref=$obj->project_ref;
|
||||
$projectstatic->title=$obj->project_label;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
@@ -767,7 +785,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['p.ref_client']['checked']))
|
||||
{
|
||||
// Customer ref
|
||||
print '<td class="nocellnopadd nowrap">';
|
||||
print '<td class="nowrap">';
|
||||
print $obj->ref_client;
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@@ -776,20 +794,24 @@ if ($resql)
|
||||
if (! empty($arrayfields['pr.ref']['checked']))
|
||||
{
|
||||
// Project ref
|
||||
print '<td class="nocellnopadd nowrap">';
|
||||
if ($obj->project_id) {
|
||||
$projectstatic->fetch($obj->project_id);
|
||||
print '<td class="nowrap">';
|
||||
if ($obj->project_id > 0) {
|
||||
print $projectstatic->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->client=$obj->client;
|
||||
$companystatic->code_client=$obj->code_client;
|
||||
$companystatic->email=$obj->email;
|
||||
if (! empty($arrayfields['pr.title']['checked']))
|
||||
{
|
||||
// Project label
|
||||
print '<td class="nowrap">';
|
||||
if ($obj->project_id > 0) {
|
||||
print $projectstatic->title;
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Thirdparty
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
|
||||
@@ -252,7 +252,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
print '<tr><td class="left">'.$langs->trans("ThirdParty").'</td><td class="left">';
|
||||
$filter='s.client in (1,2,3)';
|
||||
$filter='s.client IN (1,2,3)';
|
||||
print $form->select_company($socid, 'socid', $filter, 1, 0, 0, array(), 0, '', 'style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
// User
|
||||
|
||||
0
htdocs/commande/card.php
Executable file → Normal file
0
htdocs/commande/card.php
Executable file → Normal file
@@ -499,7 +499,7 @@ class Commande extends CommonOrder
|
||||
return -1;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@@ -1685,7 +1685,7 @@ class Commande extends CommonOrder
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON c.fk_cond_reglement = cr.rowid';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON c.fk_mode_reglement = p.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON c.fk_availability = ca.rowid';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON c.fk_input_reason = ca.rowid';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON c.fk_input_reason = dr.rowid';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';
|
||||
|
||||
if ($id) $sql.= " WHERE c.rowid=".$id;
|
||||
|
||||
@@ -84,6 +84,7 @@ $viewstatut=GETPOST('viewstatut');
|
||||
$search_btn=GETPOST('button_search', 'alpha');
|
||||
$search_remove_btn=GETPOST('button_removefilter', 'alpha');
|
||||
$search_project_ref=GETPOST('search_project_ref', 'alpha');
|
||||
$search_project=GETPOST('search_project', 'alpha');
|
||||
|
||||
// Security check
|
||||
$id = (GETPOST('orderid')?GETPOST('orderid', 'int'):GETPOST('id', 'int'));
|
||||
@@ -125,24 +126,25 @@ if (empty($user->socid)) $fieldstosearchall["c.note_private"]="NotePrivate";
|
||||
|
||||
$checkedtypetiers=0;
|
||||
$arrayfields=array(
|
||||
'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||
'c.ref_client'=>array('label'=>$langs->trans("RefCustomerOrder"), 'checked'=>1),
|
||||
'p.project_ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0, 'enabled'=>1),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
||||
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers),
|
||||
'c.date_commande'=>array('label'=>$langs->trans("OrderDateShort"), 'checked'=>1),
|
||||
'c.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)),
|
||||
'c.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
|
||||
'c.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
||||
'c.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0),
|
||||
'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
'c.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
||||
'c.facture'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)))
|
||||
'c.ref'=>array('label'=>"Ref", 'checked'=>1),
|
||||
'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>1),
|
||||
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)),
|
||||
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>1),
|
||||
's.zip'=>array('label'=>"Zip", 'checked'=>1),
|
||||
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
|
||||
'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1),
|
||||
'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)),
|
||||
'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
|
||||
'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0),
|
||||
'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0),
|
||||
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
||||
'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
||||
'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'position'=>1000, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)))
|
||||
);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
@@ -197,6 +199,7 @@ if (empty($reshook))
|
||||
$search_deliverymonth='';
|
||||
$search_deliveryyear='';
|
||||
$search_project_ref='';
|
||||
$search_project='';
|
||||
$viewstatut='';
|
||||
$billed='';
|
||||
$toselect='';
|
||||
@@ -245,11 +248,10 @@ $sql.= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql.= ' c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client,';
|
||||
$sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,';
|
||||
$sql.= ' c.date_creation as date_creation, c.tms as date_update,';
|
||||
$sql.= " p.rowid as project_id, p.ref as project_ref";
|
||||
$sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label";
|
||||
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||
@@ -316,6 +318,7 @@ if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.elemen
|
||||
if ($search_total_ht != '') $sql.= natural_search('c.total_ht', $search_total_ht, 1);
|
||||
if ($search_total_ttc != '') $sql.= natural_search('c.total_ttc', $search_total_ttc, 1);
|
||||
if ($search_project_ref != '') $sql.= natural_search("p.ref", $search_project_ref);
|
||||
if ($search_project != '') $sql.= natural_search("p.title", $search_project);
|
||||
if ($search_categ_cus > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ_cus);
|
||||
if ($search_categ_cus == -2) $sql.= " AND cc.fk_categorie IS NULL";
|
||||
// Add where from extra fields
|
||||
@@ -427,11 +430,10 @@ if ($resql)
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'cancelorders'=>$langs->trans("Cancel"),
|
||||
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
if($user->rights->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||
if ($user->rights->commande->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
@@ -441,10 +443,8 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($contextpage == 'orderlist' && $user->rights->commande->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/commande/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/commande/card.php?action=create');
|
||||
}
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@@ -596,10 +596,15 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
// Project ref
|
||||
if (! empty($arrayfields['p.project_ref']['checked']))
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_project_ref" value="'.$search_project_ref.'"></td>';
|
||||
}
|
||||
// Project title
|
||||
if (! empty($arrayfields['p.title']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_project" value="'.$search_project.'"></td>';
|
||||
}
|
||||
// Thirpdarty
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
@@ -722,7 +727,8 @@ if ($resql)
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['c.ref_client']['checked'])) print_liste_field_titre($arrayfields['c.ref_client']['label'], $_SERVER["PHP_SELF"], 'c.ref_client', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['p.project_ref']['checked'])) print_liste_field_titre($arrayfields['p.project_ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['p.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
|
||||
@@ -782,6 +788,10 @@ if ($resql)
|
||||
$generic_commande->total_tva = $obj->total_tva;
|
||||
$generic_commande->total_ttc = $obj->total_ttc;
|
||||
|
||||
$projectstatic->id=$obj->project_id;
|
||||
$projectstatic->ref=$obj->project_ref;
|
||||
$projectstatic->title=$obj->project_label;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
@@ -933,17 +943,30 @@ if ($resql)
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Project
|
||||
if (! empty($arrayfields['p.project_ref']['checked']))
|
||||
// Project ref
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
$projectstatic->id=$obj->project_id;
|
||||
$projectstatic->ref=$obj->project_ref;
|
||||
print '<td>';
|
||||
if ($obj->project_id > 0) print $projectstatic->getNomUrl(1);
|
||||
print '<td class="nowrap">';
|
||||
if ($obj->project_id > 0)
|
||||
{
|
||||
print $projectstatic->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Project label
|
||||
if (! empty($arrayfields['p.title']['checked']))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
if ($obj->project_id > 0)
|
||||
{
|
||||
print $projectstatic->title;
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Third party
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||
@@ -50,14 +50,14 @@ $id = (GETPOST('id')?GETPOST('id', 'int'):GETPOST("facid", "int")); // For b
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$sref = GETPOST('sref');
|
||||
$sref_client = GETPOST('sref_client');
|
||||
$sref = GETPOST('sref', 'alpha');
|
||||
$sref_client = GETPOST('sref_client', 'alpha');
|
||||
$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$selected = GETPOST('orders_to_invoice');
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$viewstatut = GETPOST('viewstatut');
|
||||
$viewstatut = GETPOST('viewstatut', 'alpha');
|
||||
|
||||
$error = 0;
|
||||
|
||||
@@ -290,32 +290,32 @@ if (($action == 'create' || $action == 'add') && !$error)
|
||||
$array_options = $lines[$i]->array_options;
|
||||
}
|
||||
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$ii,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line,
|
||||
$lines[$i]->fk_fournprice,
|
||||
$lines[$i]->pa_ht,
|
||||
$lines[$i]->label,
|
||||
$array_options
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$ii,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line,
|
||||
$lines[$i]->fk_fournprice,
|
||||
$lines[$i]->pa_ht,
|
||||
$lines[$i]->label,
|
||||
$array_options
|
||||
);
|
||||
if ($result > 0)
|
||||
{
|
||||
@@ -578,9 +578,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
{
|
||||
$sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\'';
|
||||
}
|
||||
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
|
||||
$resql = $db->query($sql);
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($socid)
|
||||
@@ -604,6 +604,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
print '<h3>'.$companystatic->getNomUrl(1, 'customer').'</h3>';
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.ref', '', '&socid='.$socid, '', $sortfield, $sortorder);
|
||||
@@ -618,8 +619,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
print '<form method="get" action="orderstoinvoice.php">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
|
||||
//REF
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="sref" value="'.$sref.'">';
|
||||
print '</td>';
|
||||
|
||||
@@ -668,11 +670,11 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
$generic_commande->date_livraison = $db->jdate($objp->date_livraison);
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print '<td class="nobordernopadding nowraponall">';
|
||||
print $generic_commande->getNomUrl(1, 0);
|
||||
print '</td>';
|
||||
|
||||
print '<td width="20" class="nobordernopadding nowrap">';
|
||||
print '<td width="20" class="nobordernopadding nowraponall">';
|
||||
if ($generic_commande->hasDelay()) {
|
||||
print img_picto($langs->trans("Late"), "warning");
|
||||
}
|
||||
@@ -713,10 +715,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
$i++;
|
||||
}
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
* Boutons actions
|
||||
*/
|
||||
// Buttons actions
|
||||
print '<br><div class="center"><input type="checkbox" '.(empty($conf->global->INVOICE_CLOSE_ORDERS_OFF_BY_DEFAULT_FORMASSINVOICE)?' checked="checked"':'').' name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
|
||||
print '<div class="right">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
@@ -726,7 +727,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
print '<input type="submit" class="butAction" value="'.$langs->trans("GenerateBill").'">';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -264,7 +264,7 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
print '<tr><td class="left">'.$langs->trans("ThirdParty").'</td><td class="left">';
|
||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||
if ($mode == 'customer') $filter='s.client IN (1,2,3)';
|
||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||
print $form->select_company($socid, 'socid', $filter, 1, 0, 0, array(), 0, '', 'style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -756,34 +756,16 @@ if ($resql)
|
||||
{
|
||||
if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments
|
||||
{
|
||||
if ($user->rights->banque->modifier) {
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
} else {
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)), '', $user->rights->banque->modifier);
|
||||
}
|
||||
else // If direct entries is not done using miscellaneous payments
|
||||
else // If direct entries is not done using miscellaneous payments
|
||||
{
|
||||
if ($user->rights->banque->modifier) {
|
||||
$newcardbutton = '<a class="butActionNew" href="'.$_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param.'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
} else {
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', $user->rights->banque->modifier);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("FeatureDisabled").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -924,7 +906,7 @@ if ($resql)
|
||||
}
|
||||
if (! empty($arrayfields['balance']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$htmltext=$langs->trans("BalanceVisibilityDependsOnSortAndFilters", $langs->transnoentitiesnoconv("DateValue"));
|
||||
print $form->textwithpicto('', $htmltext, 1);
|
||||
print '</td>';
|
||||
|
||||
@@ -227,9 +227,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->banque->configurer)
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewFinancialAccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ if ($result)
|
||||
// Credit
|
||||
print '<td class="liste_titre right"><input name="search_amount_cred" class="flat" type="text" size="8" value="'.$search_amount_cred.'"></td>';
|
||||
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
@@ -234,6 +234,8 @@ if ($action=="create" || $action=="start")
|
||||
{
|
||||
$posmodule = GETPOST('posmodule', 'alpha');
|
||||
$terminalid = GETPOST('posnumber', 'alpha');
|
||||
$terminaltouse = $terminalid;
|
||||
if ($terminaltouse == '1') $terminaltouse = '';
|
||||
|
||||
// Calculate $initialbalanceforterminal for terminal 0
|
||||
foreach($arrayofpaymentmode as $key => $val)
|
||||
@@ -245,24 +247,33 @@ if ($action=="create" || $action=="start")
|
||||
}
|
||||
|
||||
// Get the bank account dedicated to this point of sale module/terminal
|
||||
$bankid = $conf->global->CASHDESK_ID_BANKACCOUNT_CASH; // This value is ok for 'Terminal 0' for module 'CashDesk' and 'TakePos' (they manage only 1 terminal)
|
||||
$vartouse=CASHDESK_ID_BANKACCOUNT_CASH.$terminaltouse;
|
||||
$bankid = $conf->global->$vartouse; // This value is ok for 'Terminal 0' for module 'CashDesk' and 'TakePos' (they manage only 1 terminal)
|
||||
// Hook to get the good bank id according to posmodule and posnumber.
|
||||
// @TODO add hook here
|
||||
|
||||
$sql = "SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX."bank";
|
||||
$sql.= " WHERE fk_account = ".$bankid;
|
||||
if ($syear && ! $smonth) $sql.= " AND dateo < '".$db->idate(dol_get_first_day($syear, 1))."'";
|
||||
elseif ($syear && $smonth && ! $sday) $sql.= " AND dateo < '".$db->idate(dol_get_first_day($syear, $smonth))."'";
|
||||
elseif ($syear && $smonth && $sday) $sql.= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'";
|
||||
else dol_print_error('', 'Year not defined');
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
if ($bankid > 0)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) $initialbalanceforterminal[$terminalid][$key] = $obj->total;
|
||||
$sql = "SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX."bank";
|
||||
$sql.= " WHERE fk_account = ".$bankid;
|
||||
if ($syear && ! $smonth) $sql.= " AND dateo < '".$db->idate(dol_get_first_day($syear, 1))."'";
|
||||
elseif ($syear && $smonth && ! $sday) $sql.= " AND dateo < '".$db->idate(dol_get_first_day($syear, $smonth))."'";
|
||||
elseif ($syear && $smonth && $sday) $sql.= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'";
|
||||
else dol_print_error('', 'Year not defined');
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) $initialbalanceforterminal[$terminalid][$key] = $obj->total;
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("SetupOfTerminalNotComplete", $terminalid), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
|
||||
// Calculate $theoricalamountforterminal for terminal 0
|
||||
@@ -332,7 +343,16 @@ if ($action=="create" || $action=="start")
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$form->selectarray('posmodule', $arrayofposavailable, GETPOST('posmodule', 'alpha'), (count($arrayofposavailable)>1?1:0)).'</td>';
|
||||
print '<td><input name="posnumber" type="text" class="maxwidth50" value="'.(GETPOSTISSET('posnumber')?GETPOST('posnumber', 'alpha'):'0').'"></td>';
|
||||
print '<td>';
|
||||
$array=array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6", 7=>"7", 8=>"8", 9=>"9");
|
||||
$selectedposnumber=0; $showempty=1;
|
||||
if ($conf->global->TAKEPOS_NUM_TERMINALS == '1')
|
||||
{
|
||||
$selectedposnumber=1; $showempty=0;
|
||||
}
|
||||
print $form->selectarray('posnumber', $array, GETPOSTISSET('posnumber')?GETPOST('posnumber', 'int'):$selectedposnumber, $showempty);
|
||||
//print '<input name="posnumber" type="text" class="maxwidth50" value="'.(GETPOSTISSET('posnumber')?GETPOST('posnumber', 'alpha'):'0').'">';
|
||||
print '</td>';
|
||||
// Year
|
||||
print '<td>';
|
||||
$retstring='<select'.($disabled?' disabled':'').' class="flat valignmiddle maxwidth75imp" id="'.$prefix.'year" name="'.$prefix.'year">';
|
||||
@@ -380,6 +400,7 @@ if ($action=="create" || $action=="start")
|
||||
print '</td>';
|
||||
print '</table>';
|
||||
|
||||
// Table to see/enter balance
|
||||
if ($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1')
|
||||
{
|
||||
$posmodule = GETPOST('posmodule', 'alpha');
|
||||
@@ -561,7 +582,7 @@ if (empty($action) || $action=="view")
|
||||
print '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="report.php?id='.$id.'">' . $langs->trans('PrintTicket') . '</a></div>';
|
||||
if ($object->status == CashControl::STATUS_DRAFT)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '&action=close">' . $langs->trans('Close') . '</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '&action=close">' . $langs->trans('ValidateAndClose') . '</a></div>';
|
||||
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '&action=confirm_delete">' . $langs->trans('Delete') . '</a></div>';
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ else $sql.=" WHERE 1 = 1";
|
||||
foreach($search as $key => $val)
|
||||
{
|
||||
if ($key == 'status' && $search[$key] == -1) continue;
|
||||
$mode_search=(($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key]))?1:0);
|
||||
$mode_search=(($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
|
||||
if ($search[$key] != '') $sql.=natural_search($key, $search[$key], (($key == 'status')?2:$mode_search));
|
||||
}
|
||||
if ($search_all) $sql.= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||
@@ -387,10 +387,11 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
||||
print '<tr class="liste_titre">';
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
$cssforfield='';
|
||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||
$cssforfield='';
|
||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
|
||||
}
|
||||
// Extra fields
|
||||
@@ -401,7 +402,7 @@ $parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="liste_titre right">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@@ -413,14 +414,15 @@ print '</tr>'."\n";
|
||||
print '<tr class="liste_titre">';
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
$cssforfield='';
|
||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||
{
|
||||
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n";
|
||||
}
|
||||
$cssforfield='';
|
||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||
{
|
||||
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n";
|
||||
}
|
||||
}
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
@@ -463,10 +465,15 @@ while ($i < min($num, $limit))
|
||||
print '<tr class="oddeven">';
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
$cssforfield='';
|
||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||
$cssforfield='';
|
||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||
|
||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
|
||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||
|
||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||
{
|
||||
print '<td';
|
||||
|
||||
@@ -55,20 +55,20 @@ class CashControl extends CommonObject
|
||||
public $picto = 'account';
|
||||
|
||||
public $fields=array(
|
||||
'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>10),
|
||||
'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>10),
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>15),
|
||||
'ref' =>array('type'=>'varchar(64)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>18),
|
||||
'posmodule' =>array('type'=>'varchar(30)', 'label'=>'Module', 'enabled'=>1, 'visible'=>1, 'notnul'=>1, 'position'=>19),
|
||||
'posnumber' =>array('type'=>'varchar(30)', 'label'=>'CashDesk', 'enabled'=>1, 'visible'=>1, 'notnul'=>1, 'position'=>20),
|
||||
'posmodule' =>array('type'=>'varchar(30)', 'label'=>'Module', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>19),
|
||||
'posnumber' =>array('type'=>'varchar(30)', 'label'=>'CashDesk', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>20),
|
||||
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>0, 'position'=>24),
|
||||
'opening' =>array('type'=>'double(24,8)', 'label'=>'Opening', 'enabled'=>1, 'visible'=>1, 'position'=>25),
|
||||
'cash' =>array('type'=>'double(24,8)', 'label'=>'Cash', 'enabled'=>1, 'visible'=>1, 'position'=>30),
|
||||
'cheque' =>array('type'=>'double(24,8)', 'label'=>'Cheque', 'enabled'=>1, 'visible'=>1, 'position'=>33),
|
||||
'card' =>array('type'=>'double(24,8)', 'label'=>'CreditCard', 'enabled'=>1, 'visible'=>1, 'position'=>36),
|
||||
'year_close' =>array('type'=>'integer', 'label'=>'Year close', 'enabled'=>1, 'visible'=>1, 'notnul'=>1, 'position'=>50),
|
||||
'month_close' =>array('type'=>'integer', 'label'=>'Month close', 'enabled'=>1, 'visible'=>1, 'position'=>55),
|
||||
'day_close' =>array('type'=>'integer', 'label'=>'Day close', 'enabled'=>1, 'visible'=>1, 'position'=>60),
|
||||
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValid', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>490),
|
||||
'opening' =>array('type'=>'price', 'label'=>'Opening', 'enabled'=>1, 'visible'=>1, 'position'=>25),
|
||||
'cash' =>array('type'=>'price', 'label'=>'Cash', 'enabled'=>1, 'visible'=>1, 'position'=>30),
|
||||
'cheque' =>array('type'=>'price', 'label'=>'Cheque', 'enabled'=>1, 'visible'=>1, 'position'=>33),
|
||||
'card' =>array('type'=>'price', 'label'=>'CreditCard', 'enabled'=>1, 'visible'=>1, 'position'=>36),
|
||||
'year_close' =>array('type'=>'integer', 'label'=>'Year close', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>50, 'css'=>'center'),
|
||||
'month_close' =>array('type'=>'integer', 'label'=>'Month close', 'enabled'=>1, 'visible'=>1, 'position'=>55, 'css'=>'center'),
|
||||
'day_close' =>array('type'=>'integer', 'label'=>'Day close', 'enabled'=>1, 'visible'=>1, 'position'=>60, 'css'=>'center'),
|
||||
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>490),
|
||||
'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'Tms', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>505),
|
||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'Import key', 'enabled'=>1, 'visible'=>0, 'position'=>510),
|
||||
@@ -355,66 +355,68 @@ class CashControl extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Return clicable link of object (with eventually picto)
|
||||
* Return clicable link of object (with eventually picto)
|
||||
*
|
||||
* @param int $withpicto Add picto into link
|
||||
* @param string $option Where point the link ('stock', 'composition', 'category', 'supplier', '')
|
||||
* @param int $maxlength Maxlength of ref
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $notooltip No tooltip
|
||||
* @return string String with URL
|
||||
* @param int $withpicto Add picto into link
|
||||
* @param string $option On what the link point to ('nolink', ...)
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param string $morecss Add more css on link
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0)
|
||||
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
|
||||
{
|
||||
global $conf, $langs, $hookmanager;
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||
|
||||
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||
|
||||
$result='';
|
||||
|
||||
$newref=($this->ref?$this->ref:$this->id);
|
||||
if ($maxlength) { $newref=dol_trunc($newref, $maxlength, 'middle'); }
|
||||
|
||||
$label = '<u>' . $langs->trans("ShowCashFence") . '</u>';
|
||||
$label .= '<br><b>' . $langs->trans('ProductRef') . ':</b> ' . ($this->ref?$this->ref:$this->id);
|
||||
|
||||
$linkclose='';
|
||||
if (empty($notooltip)) {
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$label=$langs->trans("ShowCashFence");
|
||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
|
||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"';
|
||||
$linkclose.= ' class="classfortooltip"';
|
||||
|
||||
/*
|
||||
$hookmanager->initHooks(array('productdao'));
|
||||
$parameters=array('id'=>$this->id);
|
||||
$reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook > 0) $linkclose = $hookmanager->resPrint;
|
||||
*/
|
||||
}
|
||||
$label.= '<br>';
|
||||
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . ($this->ref?$this->ref:$this->id);
|
||||
|
||||
$url = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.$this->id;
|
||||
|
||||
if ($option !== 'nolink') {
|
||||
// Add param to save lastsearch_values or not
|
||||
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
|
||||
if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values=1;
|
||||
}
|
||||
if ($add_save_lastsearch_values) { $url.='&save_lastsearch_values=1';
|
||||
}
|
||||
if ($option != 'nolink')
|
||||
{
|
||||
// Add param to save lastsearch_values or not
|
||||
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
|
||||
if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
|
||||
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
|
||||
}
|
||||
|
||||
$linkclose='';
|
||||
if (empty($notooltip))
|
||||
{
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label=$langs->trans("ShowMyObject");
|
||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
||||
|
||||
/*
|
||||
$hookmanager->initHooks(array('myobjectdao'));
|
||||
$parameters=array('id'=>$this->id);
|
||||
$reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook > 0) $linkclose = $hookmanager->resPrint;
|
||||
*/
|
||||
}
|
||||
else $linkclose = ($morecss?' class="'.$morecss.'"':'');
|
||||
|
||||
$linkstart = '<a href="'.$url.'"';
|
||||
$linkstart.=$linkclose.'>';
|
||||
$linkend='</a>';
|
||||
|
||||
$result.=$linkstart;
|
||||
if ($withpicto) {
|
||||
$result.=(img_object(($notooltip?'':$label), 'bank', ($notooltip?'class="paddingright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
||||
}
|
||||
$result.= $newref;
|
||||
$result.= $linkend;
|
||||
$result .= $linkstart;
|
||||
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
|
||||
if ($withpicto != 2) $result.= $this->ref;
|
||||
$result .= $linkend;
|
||||
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
|
||||
|
||||
global $action;
|
||||
$hookmanager->initHooks(array('cashfencedao'));
|
||||
|
||||
@@ -41,7 +41,7 @@ include_once 'class/cashcontrol.class.php';
|
||||
$cashcontrol= new CashControl($db);
|
||||
$cashcontrol->fetch($id);
|
||||
|
||||
$limit = GETPOST('limit')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
//$limit = GETPOST('limit')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
$sortorder='ASC';
|
||||
$sortfield='b.datev,b.dateo,b.rowid';
|
||||
|
||||
@@ -72,7 +72,7 @@ llxHeader('', $langs->trans("CashControl"), '', '', 0, 0, array(), array(), $par
|
||||
$sql.= " b.fk_account, b.fk_type,";
|
||||
$sql.= " ba.rowid as bankid, ba.ref as bankref,";
|
||||
$sql.= " bu.url_id,";
|
||||
$sql.= " f.module_source, f.facnumber as facnumber";
|
||||
$sql.= " f.module_source, f.ref as ref";
|
||||
$sql.= " FROM ";
|
||||
//if ($bid) $sql.= MAIN_DB_PREFIX."bank_class as l,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."bank_account as ba,";
|
||||
@@ -95,7 +95,7 @@ $sql.=" OR b.fk_account=".$conf->global->CASHDESK_ID_BANKACCOUNT_CB;
|
||||
$sql.=" OR b.fk_account=".$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE;
|
||||
$sql.=")";
|
||||
*/
|
||||
$sql = "SELECT f.rowid as facid, f.facnumber, f.datef as do, pf.amount as amount, b.fk_account as bankid, cp.code";
|
||||
$sql = "SELECT f.rowid as facid, f.ref, f.datef as do, pf.amount as amount, b.fk_account as bankid, cp.code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as cp, ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql.= " WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id = p.fk_paiement AND p.fk_bank = b.rowid";
|
||||
$sql.= " AND f.module_source = '".$db->escape($posmodule)."'";
|
||||
@@ -152,7 +152,7 @@ if ($resql)
|
||||
$cash=$bank=$cheque=$other=0;
|
||||
|
||||
$totalarray=array();
|
||||
while ($i < min($num, $limit))
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user