Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_PDF_DOCUMENT_COLUMN_new_files
This commit is contained in:
commit
ec23cd0da4
68
.travis.yml
68
.travis.yml
@ -2,7 +2,7 @@
|
|||||||
# from Dolibarr GitHub repository.
|
# from Dolibarr GitHub repository.
|
||||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||||
|
|
||||||
# We use dist: precise to have php 5.3 available
|
# We use dist: trusty to have php 5.4+ available
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
@ -37,7 +37,6 @@ php:
|
|||||||
- '7.0'
|
- '7.0'
|
||||||
- '7.1'
|
- '7.1'
|
||||||
- '7.2'
|
- '7.2'
|
||||||
#- hhvm only with dist: trusty
|
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@ -59,10 +58,17 @@ env:
|
|||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: hhvm
|
|
||||||
- php: nightly
|
- php: nightly
|
||||||
# We exclude some combinations not usefull to save Travis CPU
|
# We exclude some combinations not usefull to save Travis CPU
|
||||||
exclude:
|
exclude:
|
||||||
|
- php: '5.5'
|
||||||
|
env: DB=mariadb
|
||||||
|
- php: '5.6'
|
||||||
|
env: DB=mariadb
|
||||||
|
- php: '7.0'
|
||||||
|
env: DB=mariadb
|
||||||
|
- php: '7.1'
|
||||||
|
env: DB=mariadb
|
||||||
- php: '5.5'
|
- php: '5.5'
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- php: '5.6'
|
- php: '5.6'
|
||||||
@ -71,8 +77,6 @@ matrix:
|
|||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- php: '7.1'
|
- php: '7.1'
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- php: hhvm
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: nightly
|
- php: nightly
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
|
|
||||||
@ -133,7 +137,7 @@ install:
|
|||||||
|
|
||||||
- |
|
- |
|
||||||
echo "Installing PHP CodeSniffer"
|
echo "Installing PHP CodeSniffer"
|
||||||
composer -n require squizlabs/php_codesniffer ^2
|
composer -n require squizlabs/php_codesniffer ^3
|
||||||
echo
|
echo
|
||||||
|
|
||||||
- |
|
- |
|
||||||
@ -207,8 +211,7 @@ before_script:
|
|||||||
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||||
fi
|
fi
|
||||||
if [ "$DB" = 'postgresql' ]; then
|
if [ "$DB" = 'postgresql' ]; then
|
||||||
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
#pgloader mysql://root:pass@127.0.0.1/dolibarr_35 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev
|
||||||
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
|
|
||||||
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||||
fi
|
fi
|
||||||
# TODO: SQLite
|
# TODO: SQLite
|
||||||
@ -217,7 +220,7 @@ before_script:
|
|||||||
- |
|
- |
|
||||||
export CONF_FILE=htdocs/conf/conf.php
|
export CONF_FILE=htdocs/conf/conf.php
|
||||||
echo "Setting up Dolibarr $CONF_FILE"
|
echo "Setting up Dolibarr $CONF_FILE"
|
||||||
echo '<?php ' > $CONF_FILE
|
echo '<?php' > $CONF_FILE
|
||||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||||
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
|
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
|
||||||
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
|
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
|
||||||
@ -238,8 +241,9 @@ before_script:
|
|||||||
- |
|
- |
|
||||||
echo "Create documents directory and set permissions"
|
echo "Create documents directory and set permissions"
|
||||||
# and admin/temp subdirectory needed for unit tests
|
# and admin/temp subdirectory needed for unit tests
|
||||||
mkdir -p documents/admin/temp
|
mkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp
|
||||||
echo "first line" > documents/dolibarr.log
|
sudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents
|
||||||
|
echo "***** First line of dolibarr.log" > $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
@ -334,13 +338,12 @@ script:
|
|||||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
|
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
|
||||||
php upgrade2.php 7.0.0 8.0.0 MAIN_MODULE_TICKETSUP > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
php upgrade2.php 7.0.0 8.0.0 MAIN_MODULE_TICKETSUP > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
||||||
php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log
|
php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log
|
||||||
|
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log
|
||||||
|
php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log
|
||||||
|
php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log
|
||||||
cd -
|
cd -
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
#cat $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
|
||||||
#cat $TRAVIS_BUILD_DIR/upgrade500600.log
|
|
||||||
#cat $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
|
||||||
#cat $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
|
||||||
#cat /tmp/dolibarr_install.log
|
#cat /tmp/dolibarr_install.log
|
||||||
|
|
||||||
- |
|
- |
|
||||||
@ -348,18 +351,15 @@ script:
|
|||||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.
|
# Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.
|
||||||
set -e
|
set -e
|
||||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||||
|
phpunitresult=$?
|
||||||
|
echo "Phpunit return code = $phpunitresult"
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
- |
|
|
||||||
#echo "Output dolibarr.log"
|
|
||||||
#cat documents/dolibarr.log
|
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- |
|
- |
|
||||||
# Dolibarr log file
|
echo "After script - Output 50 latest lines of dolibarr.log"
|
||||||
#echo "After script"
|
ls $TRAVIS_BUILD_DIR/documents
|
||||||
#cat documents/dolibarr.log
|
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
|
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- |
|
- |
|
||||||
@ -367,20 +367,24 @@ after_success:
|
|||||||
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- |
|
- |
|
||||||
echo Failure
|
echo Failure detected, so we show samples of log to help diagnose
|
||||||
# This part of code seems to be never executed, error or not ???
|
# This part of code is executed only if previous commande that fails are enclosed with set +e
|
||||||
echo "Debugging informations"
|
|
||||||
# Upgrade log files
|
# Upgrade log files
|
||||||
cat *.log
|
for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||||
echo "Debugging informations"
|
do
|
||||||
|
echo "Debugging informations for file $ficlog"
|
||||||
|
#cat $ficlog
|
||||||
|
done
|
||||||
# Apache log file
|
# Apache log file
|
||||||
|
echo "Debugging informations for file apache error.log"
|
||||||
sudo cat /var/log/apache2/error.log
|
sudo cat /var/log/apache2/error.log
|
||||||
# Dolibarr log file
|
|
||||||
cat documents/dolibarr.log
|
|
||||||
if [ "$DEBUG" = true ]; then
|
if [ "$DEBUG" = true ]; then
|
||||||
|
# Dolibarr log file
|
||||||
|
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||||
|
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
# MariaDB log file
|
# MariaDB log file
|
||||||
sudo cat /var/log/mysql/error.log
|
echo "Debugging informations for file mysql error.log"
|
||||||
|
sudo tail -n 50 /var/log/mysql/error.log
|
||||||
# TODO: PostgreSQL log file
|
# TODO: PostgreSQL log file
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,12 @@ source_file = htdocs/langs/en_US/bills.lang
|
|||||||
source_lang = en_US
|
source_lang = en_US
|
||||||
type = MOZILLAPROPERTIES
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
|
[dolibarr.blockedlog]
|
||||||
|
file_filter = htdocs/langs/<lang>/blockedlog.lang
|
||||||
|
source_file = htdocs/langs/en_US/blockedlog.lang
|
||||||
|
source_lang = en_US
|
||||||
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
[dolibarr.bookmarks]
|
[dolibarr.bookmarks]
|
||||||
file_filter = htdocs/langs/<lang>/bookmarks.lang
|
file_filter = htdocs/langs/<lang>/bookmarks.lang
|
||||||
source_file = htdocs/langs/en_US/bookmarks.lang
|
source_file = htdocs/langs/en_US/bookmarks.lang
|
||||||
|
|||||||
269
ChangeLog
269
ChangeLog
@ -2,6 +2,250 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 9.0.0 compared to 8.0.0 *****
|
||||||
|
For Users:
|
||||||
|
NEW: Stable module: Website
|
||||||
|
NEW: Stable module: WebDAV
|
||||||
|
NEW: Stable module: Module Builder
|
||||||
|
NEW: Dolibarr can provide information in page title when multicompany is enabled of not, making
|
||||||
|
Android application like DoliDroid able to provide native features for multicompany module.
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
* Code changes to be more compatible with PSR2
|
||||||
|
* Removed trigger USER_LOGOUT, USER_LOGIN, USER_LOGIN_FAILED (Some hooks are already dedicated for that)
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
|
* If you use some links like viewimages.php?modulepart=mycompany&file=... in you external modules, you must
|
||||||
|
replace them with links like viewimages.php?modulepart=mycompany&file=logos/... (note that link change only for
|
||||||
|
modulepart=mycompany that now works like others).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 8.0.1 compared to 8.0.0 *****
|
||||||
|
FIX: #9258
|
||||||
|
FIX: #9328
|
||||||
|
FIX: #9337
|
||||||
|
FIX: adding GROUP BY for PostgreSQL
|
||||||
|
FIX: API template for list pages in module builder
|
||||||
|
FIX: API template for record page to delete a record
|
||||||
|
FIX: a removed option was still in setup
|
||||||
|
FIX: badge on time spent on project and tasks
|
||||||
|
FIX: Delete file on smartphone
|
||||||
|
FIX: Fetch function will fetch comments
|
||||||
|
FIX: Fetch task will now fetch comments
|
||||||
|
FIX: $fk_account is always empty, must be $soc->fk_account
|
||||||
|
FIX: Force stripe api version to avoid trouble if we update stripe api
|
||||||
|
FIX: get_product_vat_for_country functions.lib.php
|
||||||
|
FIX: Get templates in a forced language
|
||||||
|
FIX: hook on dispatch order fourn
|
||||||
|
FIX: Language selection lost if error during creation of email template
|
||||||
|
FIX: Look and feel v8
|
||||||
|
FIX: propal.class.php
|
||||||
|
FIX: Add calls to fetchComments function
|
||||||
|
FIX: Remove fetchComments from project and task fetch function
|
||||||
|
FIX: remove internal property isextrafieldmanaged from API returns
|
||||||
|
FIX: sql error
|
||||||
|
FIX: table llx_chargessociales doesn't exists
|
||||||
|
FIX: trans on null object
|
||||||
|
FIX: vat rate code not returned by get_product_vat_for_country
|
||||||
|
FIX: warning for late template invoices to remove when suspended
|
||||||
|
FIX: Add hidden option MAIN_xxx_IN_SOURCE_ADDRESS to solve legal issues on PDF
|
||||||
|
FIX: Table llx_facture_rec_extrafields missing after migration
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 8.0.0 compared to 7.0.0 *****
|
||||||
|
For Users:
|
||||||
|
NEW: Experimental module: Ticket
|
||||||
|
NEW: Experimental module: WebDAV
|
||||||
|
NEW: Accept anonymous events (no user assigned)
|
||||||
|
NEW: Accountancy - Add import on general ledger
|
||||||
|
NEW: Accountancy - Show journal name on journal page and hide button draft export (Add an option in admin)
|
||||||
|
NEW: Can create event from record card of a company and/or member
|
||||||
|
NEW: Add a button to create Stripe customer from the customer Payment mode tab
|
||||||
|
NEW: Add accounting account number on product tooltip
|
||||||
|
NEW: Add any predefined mail content
|
||||||
|
NEW: Add arrows to navigate into containers in experimental website module
|
||||||
|
NEW: Add a tab to specify accountant/auditor of the company
|
||||||
|
NEW: Add Date delivery and Availability on Propals List
|
||||||
|
NEW: Add date in goods reception supplier order table
|
||||||
|
NEW: Add delivery_time_days of suppliers in export profile
|
||||||
|
NEW: Add Documents'tab to expedition module
|
||||||
|
NEW: Use dol_print_phone in thirdparty list page to format phone
|
||||||
|
NEW: Add entry for the GDPR contact
|
||||||
|
NEW: Add extrafield type "html"
|
||||||
|
NEW: Add file number in accountant card and update export filename
|
||||||
|
NEW: Add files management on products lot
|
||||||
|
NEW: add filter on project task list
|
||||||
|
NEW: Add hidden option COMPANY_AQUARIUM_CLEAN_REGEX to clean generated
|
||||||
|
NEW: add internal stripe payment page for invoice
|
||||||
|
NEW: Add key __USER_REMOTE_IP__ into available substitution variables
|
||||||
|
NEW: Add link between credit note invoice and origin
|
||||||
|
NEW: Add linked file tab to vat
|
||||||
|
NEW: add link to stripe's info in bank menu
|
||||||
|
NEW: Add margin filters
|
||||||
|
NEW: Add mass action enable/disable on cron job list
|
||||||
|
NEW: Add mass action on project's list to close projects
|
||||||
|
NEW: Add method to register distributed payments on invoices
|
||||||
|
NEW: Add multicurrency support for product buy price for supplier propales, orders and invoices
|
||||||
|
NEW: Add name of day in the timesheet input page per day.
|
||||||
|
NEW: add new parameters for tcpf encryption
|
||||||
|
NEW: add optional esign field in pdf propal
|
||||||
|
NEW: Add option BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD
|
||||||
|
NEW: Add option CONTRACT_SYNC_PLANNED_DATE_OF_SERVICES
|
||||||
|
NEW: Add param $dolibarr_main_restrict_ip in config file to limit ips
|
||||||
|
NEW: add pdf function to check if pdf file is protected/encrypted
|
||||||
|
NEW: Add pdf template for stock/warehouse module
|
||||||
|
NEW: Add phone format for a lot of countries
|
||||||
|
NEW: Add product and product categories filters on customer margins
|
||||||
|
NEW: Add product categories filter on product margin
|
||||||
|
NEW: Add romanian chart of accounts
|
||||||
|
NEW: Add stats in salaries module
|
||||||
|
NEW: add stripe transaction
|
||||||
|
NEW: Add tab contact on supplier proposals
|
||||||
|
NEW: Add total of time spent in timespent page at top of page too.
|
||||||
|
NEW: Add trigger CONTRACT_MODIFY
|
||||||
|
NEW: Add triggers on ECM object and add fill src_object_type/id fields
|
||||||
|
NEW: Add type of website container/page into dictionary
|
||||||
|
NEW: advance target filtering can be used everywhere with tpl and fk_element
|
||||||
|
NEW: Allow negative quantity for dispatch (supplier order)
|
||||||
|
NEW: bank reconcile: checkbox to select all bank operations
|
||||||
|
NEW: Better performance with openldap
|
||||||
|
NEW: Can add filter actiontype and notactiontype on event ical export
|
||||||
|
NEW: Can add product in supplier order/invoice even w/o predefined price
|
||||||
|
NEW: cancel orders on massaction
|
||||||
|
NEW: Can crop image files attached in "document" tabs of a member
|
||||||
|
NEW: Can delete dir content in media and ECM module recursively
|
||||||
|
NEW: Can dispatch if more than ordered (if hidden option set)
|
||||||
|
NEW: Can edit the text color for title line of tables
|
||||||
|
NEW: Can enter time spent from the list of time spent of project
|
||||||
|
NEW: Can export leave requests
|
||||||
|
NEW: Can filter on account range in general ledger grouped by account
|
||||||
|
NEW: Can filter on country and taxid into the binding page
|
||||||
|
NEW: Can filter on progression in timesheet
|
||||||
|
NEW: Can fix the bank account of a payment if payment not conciliated
|
||||||
|
NEW: Can force usage of shared link for photo of products
|
||||||
|
NEW: Can get template of email from its label
|
||||||
|
NEW: Can see Unit Purchase Value of product in stock movement
|
||||||
|
NEW: Can select from the user list into send form email (For field to and CC)
|
||||||
|
NEW: Can select sample to use when creating a new page
|
||||||
|
NEW: can send mail from project card
|
||||||
|
NEW: Can set position of images in module tickets
|
||||||
|
NEW: Can set the reply-to into email sent
|
||||||
|
NEW: Can set the start/end date of service line in invoice templates
|
||||||
|
NEW: Can share any file from the "Document" tab.
|
||||||
|
NEW: Can sort on priority in task scheduler list
|
||||||
|
NEW: Can sort order of files in attach tab for leave and expensereport
|
||||||
|
NEW: Can use setValueFrom without user modification field
|
||||||
|
NEW: Cat set the encryption algorithm for extrafields of type password
|
||||||
|
NEW: check idprof1 for country pt
|
||||||
|
NEW: default add action: new param $backurlforcard to redirect to card
|
||||||
|
NEW: default warehouse field for products + prefill warehouses when dispatching supplier orders
|
||||||
|
NEW: Display price HT on all commercial area boards
|
||||||
|
NEW: display total on contract service list
|
||||||
|
NEW: display weight volume in proposal
|
||||||
|
NEW: Edit of extrafields position page on the edit form
|
||||||
|
NEW: Experimental DAV module provides a public and private directory
|
||||||
|
NEW: export filter models can be share or not by user
|
||||||
|
NEW: Externalsite module can accept iframe content.
|
||||||
|
NEW: Filter export model is now by user
|
||||||
|
NEW: Finish implementation of option PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES
|
||||||
|
NEW: generalize use of button to create new element from list
|
||||||
|
NEW: hidden conf AGENDA_NB_WEEKS_IN_VIEW_PER_USER to set nb weeks to show into per user view
|
||||||
|
NEW: hidden conf to assign category to thirparty that are neither customer nor prospect or supplier
|
||||||
|
NEW: hidden conf to set nb weeks to show into user view
|
||||||
|
NEW: hidden option MAIN_DISABLE_FREE_LINES
|
||||||
|
NEW: improve way of adding users/sales representative to thirdparty
|
||||||
|
NEW: Introduce option THIRDPARTY_QUICKSEARCH_ON_FIELDS to personalize fields use to search on quick search.
|
||||||
|
NEW: Introduce permission "approve" for "leave request" like for "expense report"
|
||||||
|
NEW: Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
|
||||||
|
NEW: Look and feel v8 - Show Picto "+" on all links "Add record"
|
||||||
|
NEW: Look and feel v8: Use a different picto for delete and unlink
|
||||||
|
NEW: mail templates for projects
|
||||||
|
NEW: Module variant supported on services
|
||||||
|
NEW: monthly VAT report show "Claimed for the period" + "Paid during this
|
||||||
|
NEW: Mutualize code for action="update_extras"
|
||||||
|
NEW: On invoice card, show accounting account linked
|
||||||
|
NEW: Online payment of invoice and subscription record the payment
|
||||||
|
NEW: OnSearchAndListGoOnCustomerOrSupplierCard conf
|
||||||
|
NEW: Optimize load of hooks classes (save 1-5Kb of memory)
|
||||||
|
NEW: Option MAIN_SHOW_REGION_IN_STATE renamed into MAIN_SHOW_REGION_IN_STATE_SELECT are more complete
|
||||||
|
NEW: Option to force all emails recipient
|
||||||
|
NEW: Hidden option to send to salaries into emails forms
|
||||||
|
NEW: order minimum amount
|
||||||
|
NEW: add price in burger menu on mouvement list
|
||||||
|
NEW: Report a list of leave requests for a month
|
||||||
|
NEW: Section of files generated by mass action not visible if empty
|
||||||
|
NEW: send mails from project card
|
||||||
|
NEW: Show also size in bytes in tooltip if visible unit is not bytes
|
||||||
|
NEW: Show keyboard shortcut of nav arrow into tooltip
|
||||||
|
NEW: Show last result code of cron jobs in error in red
|
||||||
|
NEW: Show region in company info & Global option to show state code MAIN_SHOW_STATE_CODE
|
||||||
|
NEW: Show total number of records by category
|
||||||
|
NEW: Show total of time consumed in week in time spent entry page
|
||||||
|
NEW: Stripe online payments reuse the same stripe customer account
|
||||||
|
NEW: Suggest link to pay online for customer orders
|
||||||
|
NEW: supplier credit notes is now supported like for customer credit notes
|
||||||
|
NEW: supplier order/order lines export: add supplier product ref
|
||||||
|
NEW: supplier relative discounts
|
||||||
|
NEW: Support alternative aliases of page name in website
|
||||||
|
NEW: syslog file autoclean
|
||||||
|
NEW: thirdparty categ filter on lists
|
||||||
|
NEW: Use a css style for weekend in time spent
|
||||||
|
NEW: Use common substitution rule for language to get translation in ODT
|
||||||
|
NEW: Variable __ONLINE_PAYMENT_URL__ available in email templates
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
NEW: class reposition can also work on POST (not only GET)
|
||||||
|
NEW: add a hook in dol_print_phone
|
||||||
|
NEW: The field "visible" on extrafield can accept expression as condition
|
||||||
|
NEW: Upgrade of Stripe lib to 6.4.1
|
||||||
|
NEW: work on CommonObject 'array' field typeNew common object array
|
||||||
|
NEW: method Form::selectArrayFilter() + use in left menu search
|
||||||
|
NEW: [REST API] Add the possibility to remove a category from a thirdparty
|
||||||
|
NEW: doActions on categorycard
|
||||||
|
NEW: add "moreHtmlRef" hook
|
||||||
|
NEW: add hook for more permissions control
|
||||||
|
NEW: add hook moreHtmlStatus to complete to status on banners
|
||||||
|
NEW: Add hook printEmail
|
||||||
|
NEW: Add hook setContentSecurityPolicy
|
||||||
|
NEW: Add password_hash as a hash algorithm
|
||||||
|
NEW: Add dol_is_link function
|
||||||
|
NEW: Adds a contact to an invoice with REST API
|
||||||
|
NEW: Adds a payment for the list of invoices given as parameter
|
||||||
|
NEW: adds billing contacts ids to REST API returns
|
||||||
|
NEW: Add showempty parameter in country selection
|
||||||
|
NEW: add printUserListWhere hook
|
||||||
|
NEW: add "printUserPasswordField" hooks
|
||||||
|
NEW: Call to trigger on payment social contribution creation
|
||||||
|
NEW: Call to trigger on social contribution creation
|
||||||
|
NEW: hook getnomurltooltip is replaced with hook getNomUrl more powerfull
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
|
* Remove old deprecated hook 'insertExtraFields'. Triggers must be used for action on CRUD events.
|
||||||
|
* Hook 'maildao' was renamed into 'mail' into the method sendfile that send emails, and method was renamed from
|
||||||
|
'doaction' into 'sendMail'.
|
||||||
|
* Rename trigger CONTRACT_SERVICE_ACTIVATE into LINECONTRACT_ACTIVATE and
|
||||||
|
CONTRACT_SERVICE_CLOSE into LINECONTRACT_CLOSE
|
||||||
|
* Remove triggers *_CLONE. The trigger CREATE with context 'createfromclone' is already called so this is
|
||||||
|
a duplicated feature. Cloning is not a business event, the business event is CREATE, so no trigger required.
|
||||||
|
* PHP 5.3 is no more supported. Minimum PHP is now 5.4+
|
||||||
|
* Remove the old deprecated code of doActions and getInstanceDao in canvas. The doActions of standard hooks are
|
||||||
|
already available and are better.
|
||||||
|
* Removed method fetch_prods() and get_each_prod() not used, keep only get_arbo_each_prod() that is better.
|
||||||
|
* The hook contaxt commcard has been renamed thirdpartycomm
|
||||||
|
* The hook contaxt thirdpartycard has been renamed thirdpartycontact
|
||||||
|
* Remove method Categorie:get_nb_categories() that was not used.
|
||||||
|
* Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip
|
||||||
|
are now replaced with hook getNomUrl.
|
||||||
|
* The substitution key __CONTACTCIVNAME__ is no longer present, it has been replaced by __CONTACT_NAME_{TYPE}__
|
||||||
|
where {TYPE} is contact type code (BILLING, SHIPPING, CUSTOMER, ... see contact type dictionnary).
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
|
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
|
||||||
FIX: 7.0 task contact card without withproject parameters
|
FIX: 7.0 task contact card without withproject parameters
|
||||||
FIX: #8722
|
FIX: #8722
|
||||||
@ -40,29 +284,6 @@ FIX: supplier order: product supplier ref not saved on addline
|
|||||||
FIX: test is_erasable() must be done before call function delete() too to avoid delete invoice with &action=delete in url
|
FIX: test is_erasable() must be done before call function delete() too to avoid delete invoice with &action=delete in url
|
||||||
FIX: wrong var name $search_month_lim
|
FIX: wrong var name $search_month_lim
|
||||||
|
|
||||||
***** ChangeLog for 8.0.0 compared to 7.0.0 *****
|
|
||||||
|
|
||||||
WARNING:
|
|
||||||
|
|
||||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
|
||||||
* Remove old deprecated hook 'insertExtraFields'. Triggers must be used for action on CRUD events.
|
|
||||||
* Hook 'maildao' was renamed into 'mail' into the method sendfile that send emails, and method was renamed from
|
|
||||||
'doaction' into 'sendMail'.
|
|
||||||
* Rename trigger CONTRACT_SERVICE_ACTIVATE into LINECONTRACT_ACTIVATE and
|
|
||||||
CONTRACT_SERVICE_CLOSE into LINECONTRACT_CLOSE
|
|
||||||
* Remove triggers *_CLONE. The trigger CREATE with context 'createfromclone' is already called so this is
|
|
||||||
a duplicated feature. Cloning is not a business event, the business event is CREATE, so no trigger required.
|
|
||||||
* PHP 5.3 is no more supported. Minimum PHP is now 5.4+
|
|
||||||
* Remove the old deprecated code of doActions and getInstanceDao in canvas. The doActions of standard hooks are
|
|
||||||
already available and are better.
|
|
||||||
* Removed method fetch_prods() and get_each_prod() not used, keep only get_arbo_each_prod() that is better.
|
|
||||||
* The hook contaxt commcard has been renamed thirdpartycomm
|
|
||||||
* The hook contaxt thirdpartycard has been renamed thirdpartycontact
|
|
||||||
* Remove method Categorie:get_nb_categories() that was not used.
|
|
||||||
* Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip
|
|
||||||
are now replaced with hook getNomUrl.
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 7.0.2 compared to 7.0.1 *****
|
***** ChangeLog for 7.0.2 compared to 7.0.1 *****
|
||||||
FIX: #8023
|
FIX: #8023
|
||||||
FIX: #8259 can't update contact birthday with REST API
|
FIX: #8259 can't update contact birthday with REST API
|
||||||
@ -220,7 +441,7 @@ FIX: Use of undefined constant _ROWS_2
|
|||||||
FIX: warning when adding ECM files using old photo path
|
FIX: warning when adding ECM files using old photo path
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 7.0.0 compared to 6.0.5 *****
|
***** ChangeLog for 7.0.0 compared to 6.0.7 *****
|
||||||
For users:
|
For users:
|
||||||
NEW: Add a preview icon after files that can be previewed (pdf + images)
|
NEW: Add a preview icon after files that can be previewed (pdf + images)
|
||||||
NEW: When payment is registered, PDF of invoices are also regenerated so payments
|
NEW: When payment is registered, PDF of invoices are also regenerated so payments
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
# DOLIBARR ERP & CRM
|
# DOLIBARR ERP & CRM
|
||||||
|
|
||||||
 
|

|
||||||
|
|
||||||
|
|6|7|8|develop|
|
||||||
|
|----------|----------|----------|----------|
|
||||||
|
|||||
|
||||||
|
|
||||||
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||||
|
|
||||||
|
|||||||
@ -34,8 +34,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once($path."../htdocs/master.inc.php");
|
require_once $path."../htdocs/master.inc.php";
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -212,6 +212,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||||
%_datadir/dolibarr/htdocs/support
|
%_datadir/dolibarr/htdocs/support
|
||||||
%_datadir/dolibarr/htdocs/theme
|
%_datadir/dolibarr/htdocs/theme
|
||||||
|
%_datadir/dolibarr/htdocs/ticket
|
||||||
%_datadir/dolibarr/htdocs/user
|
%_datadir/dolibarr/htdocs/user
|
||||||
%_datadir/dolibarr/htdocs/variants
|
%_datadir/dolibarr/htdocs/variants
|
||||||
%_datadir/dolibarr/htdocs/webservices
|
%_datadir/dolibarr/htdocs/webservices
|
||||||
|
|||||||
@ -292,6 +292,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||||
%_datadir/dolibarr/htdocs/support
|
%_datadir/dolibarr/htdocs/support
|
||||||
%_datadir/dolibarr/htdocs/theme
|
%_datadir/dolibarr/htdocs/theme
|
||||||
|
%_datadir/dolibarr/htdocs/ticket
|
||||||
%_datadir/dolibarr/htdocs/user
|
%_datadir/dolibarr/htdocs/user
|
||||||
%_datadir/dolibarr/htdocs/variants
|
%_datadir/dolibarr/htdocs/variants
|
||||||
%_datadir/dolibarr/htdocs/webservices
|
%_datadir/dolibarr/htdocs/webservices
|
||||||
|
|||||||
@ -209,6 +209,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||||
%_datadir/dolibarr/htdocs/support
|
%_datadir/dolibarr/htdocs/support
|
||||||
%_datadir/dolibarr/htdocs/theme
|
%_datadir/dolibarr/htdocs/theme
|
||||||
|
%_datadir/dolibarr/htdocs/ticket
|
||||||
%_datadir/dolibarr/htdocs/user
|
%_datadir/dolibarr/htdocs/user
|
||||||
%_datadir/dolibarr/htdocs/variants
|
%_datadir/dolibarr/htdocs/variants
|
||||||
%_datadir/dolibarr/htdocs/webservices
|
%_datadir/dolibarr/htdocs/webservices
|
||||||
|
|||||||
@ -220,6 +220,7 @@ done >>%{name}.lang
|
|||||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||||
%_datadir/dolibarr/htdocs/support
|
%_datadir/dolibarr/htdocs/support
|
||||||
%_datadir/dolibarr/htdocs/theme
|
%_datadir/dolibarr/htdocs/theme
|
||||||
|
%_datadir/dolibarr/htdocs/ticket
|
||||||
%_datadir/dolibarr/htdocs/user
|
%_datadir/dolibarr/htdocs/user
|
||||||
%_datadir/dolibarr/htdocs/variants
|
%_datadir/dolibarr/htdocs/variants
|
||||||
%_datadir/dolibarr/htdocs/webservices
|
%_datadir/dolibarr/htdocs/webservices
|
||||||
|
|||||||
@ -48,6 +48,23 @@ into
|
|||||||
// initialize subsetchars
|
// initialize subsetchars
|
||||||
$subsetchars = array_fill(0, 256, true);
|
$subsetchars = array_fill(0, 256, true);
|
||||||
|
|
||||||
|
* Replace the continue into switch with a break:
|
||||||
|
|
||||||
|
case 're': {
|
||||||
|
// justify block
|
||||||
|
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
|
||||||
|
$this->lispacer = '';
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
into
|
||||||
|
case 're': {
|
||||||
|
// justify block
|
||||||
|
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
|
||||||
|
$this->lispacer = '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
* Optionnaly, removed all fonts except
|
* Optionnaly, removed all fonts except
|
||||||
dejavusans* (used by greek, arab, persan, romanian, turkish),
|
dejavusans* (used by greek, arab, persan, romanian, turkish),
|
||||||
freemono* (russian),
|
freemono* (russian),
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $error=0;
|
|||||||
|
|
||||||
// -------------------- START OF YOUR CODE HERE --------------------
|
// -------------------- START OF YOUR CODE HERE --------------------
|
||||||
// Include Dolibarr environment
|
// Include Dolibarr environment
|
||||||
require_once($path."../../htdocs/master.inc.php");
|
require_once $path."../../htdocs/master.inc.php";
|
||||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||||
|
|
||||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||||
@ -58,7 +58,7 @@ print "***** ".$script_file." (".$version.") *****\n";
|
|||||||
// Start of transaction
|
// Start of transaction
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
|
||||||
|
|
||||||
// Create invoice object
|
// Create invoice object
|
||||||
$obj = new Facture($db);
|
$obj = new Facture($db);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $error=0;
|
|||||||
|
|
||||||
// -------------------- START OF YOUR CODE HERE --------------------
|
// -------------------- START OF YOUR CODE HERE --------------------
|
||||||
// Include Dolibarr environment
|
// Include Dolibarr environment
|
||||||
require_once($path."../../htdocs/master.inc.php");
|
require_once $path."../../htdocs/master.inc.php";
|
||||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||||
|
|
||||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||||
@ -59,7 +59,7 @@ print "***** ".$script_file." (".$version.") *****\n";
|
|||||||
// Start of transaction
|
// Start of transaction
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||||
|
|
||||||
// Create order object
|
// Create order object
|
||||||
$com = new Commande($db);
|
$com = new Commande($db);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $error=0;
|
|||||||
|
|
||||||
// -------------------- START OF YOUR CODE HERE --------------------
|
// -------------------- START OF YOUR CODE HERE --------------------
|
||||||
// Include Dolibarr environment
|
// Include Dolibarr environment
|
||||||
require_once($path."../../htdocs/master.inc.php");
|
require_once $path."../../htdocs/master.inc.php";
|
||||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||||
|
|
||||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||||
@ -59,7 +59,7 @@ print "***** ".$script_file." (".$version.") *****\n";
|
|||||||
// Start of transaction
|
// Start of transaction
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php";
|
||||||
|
|
||||||
// Create instance of object
|
// Create instance of object
|
||||||
$myproduct=new Product($db);
|
$myproduct=new Product($db);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $error=0;
|
|||||||
|
|
||||||
// -------------------- START OF YOUR CODE HERE --------------------
|
// -------------------- START OF YOUR CODE HERE --------------------
|
||||||
// Include Dolibarr environment
|
// Include Dolibarr environment
|
||||||
require_once($path."../../htdocs/master.inc.php");
|
require_once $path."../../htdocs/master.inc.php";
|
||||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||||
|
|
||||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||||
@ -58,7 +58,7 @@ print "***** ".$script_file." (".$version.") *****\n";
|
|||||||
// Start of transaction
|
// Start of transaction
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/user/class/user.class.php");
|
require_once DOL_DOCUMENT_ROOT."/user/class/user.class.php";
|
||||||
|
|
||||||
// Create user object
|
// Create user object
|
||||||
$obj = new User($db);
|
$obj = new User($db);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $error=0;
|
|||||||
|
|
||||||
// -------------------- START OF YOUR CODE HERE --------------------
|
// -------------------- START OF YOUR CODE HERE --------------------
|
||||||
// Include Dolibarr environment
|
// Include Dolibarr environment
|
||||||
require_once($path."../../htdocs/master.inc.php");
|
require_once $path."../../htdocs/master.inc.php";
|
||||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||||
|
|
||||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||||
@ -65,7 +65,7 @@ print 'Argument id_thirdparty='.$argv[1]."\n";
|
|||||||
// Start of transaction
|
// Start of transaction
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
|
require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php";
|
||||||
|
|
||||||
// Create contract object
|
// Create contract object
|
||||||
$obj = new Contrat($db);
|
$obj = new Contrat($db);
|
||||||
|
|||||||
@ -32,9 +32,9 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
require __DIR__. '/../../htdocs/master.inc.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
|
||||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -33,14 +33,14 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
//$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
require __DIR__. '/../../htdocs/master.inc.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -33,7 +33,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
require __DIR__. '/../../htdocs/master.inc.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|||||||
@ -33,11 +33,11 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
//$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
require __DIR__. '/../../htdocs/master.inc.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
|
||||||
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
require_once DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php";
|
||||||
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parameters
|
* Parameters
|
||||||
@ -157,7 +157,7 @@ $user->rights->propal->propal_advance->validate=1;
|
|||||||
|
|
||||||
if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
|
if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php");
|
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
|
||||||
}
|
}
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|||||||
@ -33,7 +33,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
//$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
require __DIR__. '/../../htdocs/master.inc.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/import-products.php/i','',$_SERVER["PHP_SELF"]);
|
$path=preg_replace('/import-products.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require $path."../../htdocs/master.inc.php";
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/import-thirdparties.php/i','',$_SERVER["PHP_SELF"]);
|
$path=preg_replace('/import-thirdparties.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require $path."../../htdocs/master.inc.php";
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/import-users.php/i','',$_SERVER["PHP_SELF"]);
|
$path=preg_replace('/import-users.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require $path."../../htdocs/master.inc.php";
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/purge-data.php/i','',$_SERVER["PHP_SELF"]);
|
$path=preg_replace('/purge-data.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require $path."../../htdocs/master.inc.php";
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|||||||
@ -41,15 +41,15 @@ $passwordbase=isset($argv[6])?$argv[6]:'';
|
|||||||
|
|
||||||
// Include Dolibarr environment
|
// Include Dolibarr environment
|
||||||
$res=0;
|
$res=0;
|
||||||
if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
|
if (! $res && file_exists($path."../../master.inc.php")) $res=@include $path."../../master.inc.php";
|
||||||
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
|
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $path."../../htdocs/master.inc.php";
|
||||||
if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
|
if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php";
|
||||||
if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
|
if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php";
|
||||||
if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
|
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
|
||||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||||
if (! $res) die ("Failed to include master.inc.php file\n");
|
if (! $res) die ("Failed to include master.inc.php file\n");
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -36,15 +36,15 @@ $confirm=isset($argv[1])?$argv[1]:'';
|
|||||||
|
|
||||||
// Include Dolibarr environment
|
// Include Dolibarr environment
|
||||||
$res=0;
|
$res=0;
|
||||||
if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
|
if (! $res && file_exists($path."../../master.inc.php")) $res=@include $path."../../master.inc.php";
|
||||||
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
|
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $path."../../htdocs/master.inc.php";
|
||||||
if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
|
if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php";
|
||||||
if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
|
if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php";
|
||||||
if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
|
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
|
||||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||||
if (! $res) die ("Failed to include master.inc.php file\n");
|
if (! $res) die ("Failed to include master.inc.php file\n");
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
<description>Dolibarr coding standard.</description>
|
<description>Dolibarr coding standard.</description>
|
||||||
|
|
||||||
<exclude-pattern type="relative">build/html</exclude-pattern>
|
<exclude-pattern type="relative">build/html</exclude-pattern>
|
||||||
|
<exclude-pattern type="relative">build/aps</exclude-pattern>
|
||||||
<exclude-pattern type="relative">documents</exclude-pattern>
|
<exclude-pattern type="relative">documents</exclude-pattern>
|
||||||
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
|
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
|
||||||
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
|
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
|
||||||
@ -11,6 +12,7 @@
|
|||||||
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
|
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
|
||||||
<exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
|
<exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
|
||||||
<exclude-pattern type="relative">*.min.css</exclude-pattern>
|
<exclude-pattern type="relative">*.min.css</exclude-pattern>
|
||||||
|
<exclude-pattern type="relative">*.js</exclude-pattern>
|
||||||
|
|
||||||
<!-- List of all tests -->
|
<!-- List of all tests -->
|
||||||
|
|
||||||
@ -24,29 +26,14 @@
|
|||||||
|
|
||||||
<!-- Rules from Generic Standard -->
|
<!-- Rules from Generic Standard -->
|
||||||
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
|
<rule ref="Generic.CodeAnalysis.EmptyStatement">
|
||||||
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElse"/>
|
||||||
<severity>0</severity>
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"/>
|
||||||
</rule>
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedFOREACH">
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedForeach"/>
|
||||||
<severity>0</severity>
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowed"/>
|
||||||
</rule>
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning"/>
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIF">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSE">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSEIF">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning">
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
|
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
|
||||||
@ -171,7 +158,23 @@
|
|||||||
<!-- Disabled as this does not support tab -->
|
<!-- Disabled as this does not support tab -->
|
||||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||||
|
|
||||||
|
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
||||||
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
||||||
|
<properties>
|
||||||
|
<property name="ignoreBlankLines" value="true"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
||||||
|
|
||||||
<!-- Rules from PEAR Standard -->
|
<!-- Rules from PEAR Standard -->
|
||||||
|
|
||||||
@ -232,12 +235,12 @@
|
|||||||
<severity>5</severity>
|
<severity>5</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
<!--<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>-->
|
||||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
<!--<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>-->
|
||||||
|
|
||||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
|
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
|
||||||
|
|
||||||
@ -285,7 +288,20 @@
|
|||||||
<!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> -->
|
<!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> -->
|
||||||
|
|
||||||
<!-- Test if () are removed for includes -->
|
<!-- Test if () are removed for includes -->
|
||||||
<!-- <rule ref="PEAR.Files.IncludingFile"/> -->
|
<rule ref="PEAR.Files.IncludingFile" />
|
||||||
|
<!-- Disable some error messages that we do not want. -->
|
||||||
|
<rule ref="PEAR.Files.IncludingFile.UseInclude">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="PEAR.Files.IncludingFile.UseRequire">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.Formatting.MultiLineAssignment" />
|
<rule ref="PEAR.Formatting.MultiLineAssignment" />
|
||||||
|
|
||||||
@ -347,14 +363,20 @@
|
|||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
|
<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>-->
|
||||||
|
<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>-->
|
||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="PEAR.NamingConventions.ValidVariableName" />
|
<rule ref="PEAR.NamingConventions.ValidVariableName" />
|
||||||
|
|
||||||
|
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||||
|
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||||
|
|
||||||
<!-- This is not in PSR2 -->
|
<!-- This is not in PSR2 -->
|
||||||
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
|
|||||||
@ -27,8 +27,8 @@
|
|||||||
* @since 2008-03-04
|
* @since 2008-03-04
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php');
|
require_once '../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php';
|
||||||
require_once('../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php');
|
require_once '../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php';
|
||||||
|
|
||||||
// create new PDF document
|
// create new PDF document
|
||||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||||
|
|||||||
@ -47,8 +47,8 @@ print 'Files has been created. Check its name from your explorer'."\n";
|
|||||||
* @since 2008-09-15
|
* @since 2008-09-15
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php');
|
require_once '../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php';
|
||||||
require_once('../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php');
|
require_once '../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php';
|
||||||
|
|
||||||
// create new PDF document
|
// create new PDF document
|
||||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||||
|
|||||||
@ -64,8 +64,7 @@ class autoTranslator
|
|||||||
// Translate
|
// Translate
|
||||||
//ini_set('default_charset','UTF-8');
|
//ini_set('default_charset','UTF-8');
|
||||||
ini_set('default_charset',$this->_outputpagecode);
|
ini_set('default_charset',$this->_outputpagecode);
|
||||||
$this->parse_refLangTranslationFiles();
|
$this->parseRefLangTranslationFiles();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,7 +72,7 @@ class autoTranslator
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function parse_refLangTranslationFiles()
|
private function parseRefLangTranslationFiles()
|
||||||
{
|
{
|
||||||
|
|
||||||
$files = $this->getTranslationFilesArray($this->_refLang);
|
$files = $this->getTranslationFilesArray($this->_refLang);
|
||||||
@ -346,5 +345,4 @@ class autoTranslator
|
|||||||
|
|
||||||
return $rep;
|
return $rep;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,8 +37,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Include Dolibarr environment
|
// Include Dolibarr environment
|
||||||
require_once($path.'../../htdocs/master.inc.php');
|
require_once $path.'../../htdocs/master.inc.php';
|
||||||
require_once($path.'../../htdocs/core/lib/files.lib.php');
|
require_once $path.'../../htdocs/core/lib/files.lib.php';
|
||||||
// After this $db is an opened handler to database. We close it at end of file.
|
// After this $db is an opened handler to database. We close it at end of file.
|
||||||
|
|
||||||
// Load main language strings
|
// Load main language strings
|
||||||
@ -88,7 +88,7 @@ if ($argv[2] != 'all')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/../dev/translation/autotranslator.class.php");
|
require_once DOL_DOCUMENT_ROOT."/../dev/translation/autotranslator.class.php";
|
||||||
|
|
||||||
$langParser = new autoTranslator($argv[2],$argv[1],$dir,$file,$argv[3]);
|
$langParser = new autoTranslator($argv[2],$argv[1],$dir,$file,$argv[3]);
|
||||||
|
|
||||||
|
|||||||
@ -295,6 +295,9 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
|||||||
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
|
||||||
|
// admin.lang
|
||||||
|
if (preg_match('/^DAV_ALLOW_PUBLIC_DIR/i', $value)) $qualifiedforclean=0;
|
||||||
|
if (preg_match('/^DAV_ALLOW_ECM_DIR/i', $value)) $qualifiedforclean=0;
|
||||||
// boxes.lang
|
// boxes.lang
|
||||||
if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
|
||||||
|
|||||||
@ -121,6 +121,9 @@ if (empty($reshook))
|
|||||||
if ($country_code)
|
if ($country_code)
|
||||||
{
|
{
|
||||||
$sqlfile = DOL_DOCUMENT_ROOT.'/install/mysql/data/llx_accounting_account_'.strtolower($country_code).'.sql';
|
$sqlfile = DOL_DOCUMENT_ROOT.'/install/mysql/data/llx_accounting_account_'.strtolower($country_code).'.sql';
|
||||||
|
|
||||||
|
// FIXME Get the ADD rowid and pass it + num of comapny * 100 000 000 to run_sql as a new parameter to say to update sql on the fly to add offset to rowid and account_parent value.
|
||||||
|
|
||||||
$result = run_sql($sqlfile, 1, 0, 1);
|
$result = run_sql($sqlfile, 1, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,5 +409,6 @@ if ($resql)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1004,7 +1004,7 @@ if ($id)
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -397,6 +397,6 @@ else if ($id > 0 || $ref) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -184,6 +184,6 @@ if ($action == 'display' || $action == 'delete') {
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -800,7 +800,7 @@ if ($id)
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -190,5 +190,6 @@ print '<div class="center"><input type="submit" class="button" value="' . $langs
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -50,11 +50,11 @@ $main_option = array (
|
|||||||
|
|
||||||
$configuration = AccountancyExport::getTypeConfig();
|
$configuration = AccountancyExport::getTypeConfig();
|
||||||
|
|
||||||
$listparam = $configuration[param];
|
$listparam = $configuration['param'];
|
||||||
|
|
||||||
$listformat = $configuration[format];
|
$listformat = $configuration['format'];
|
||||||
|
|
||||||
$listcr = $configuration[cr];
|
$listcr = $configuration['cr'];
|
||||||
|
|
||||||
|
|
||||||
$model_option = array (
|
$model_option = array (
|
||||||
@ -117,7 +117,7 @@ if ($action == 'update') {
|
|||||||
if (! $error) {
|
if (! $error) {
|
||||||
// reload
|
// reload
|
||||||
$configuration = AccountancyExport::getTypeConfig();
|
$configuration = AccountancyExport::getTypeConfig();
|
||||||
$listparam = $configuration[param];
|
$listparam = $configuration['param'];
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
@ -142,27 +142,27 @@ print ' {'."\n";
|
|||||||
foreach ($listparam as $key => $param) {
|
foreach ($listparam as $key => $param) {
|
||||||
print ' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.'")'."\n";
|
print ' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.'")'."\n";
|
||||||
print ' {'."\n";
|
print ' {'."\n";
|
||||||
print ' //console.log("'.$param[label].'");'."\n";
|
print ' //console.log("'.$param['label'].'");'."\n";
|
||||||
if (empty($param[ACCOUNTING_EXPORT_FORMAT])) {
|
if (empty($param['ACCOUNTING_EXPORT_FORMAT'])) {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$conf->global->ACCOUNTING_EXPORT_FORMAT.'");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$conf->global->ACCOUNTING_EXPORT_FORMAT.'");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'."\n";
|
||||||
} else {
|
} else {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param[ACCOUNTING_EXPORT_FORMAT].'");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param['ACCOUNTING_EXPORT_FORMAT'].'");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'."\n";
|
||||||
}
|
}
|
||||||
if (empty($param[ACCOUNTING_EXPORT_SEPARATORCSV])) {
|
if (empty($param['ACCOUNTING_EXPORT_SEPARATORCSV'])) {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'."\n";
|
||||||
} else {
|
} else {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV.'");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV.'");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'."\n";
|
||||||
}
|
}
|
||||||
if (empty($param[ACCOUNTING_EXPORT_ENDLINE])) {
|
if (empty($param['ACCOUNTING_EXPORT_ENDLINE'])) {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'."\n";
|
||||||
} else {
|
} else {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'."\n";
|
||||||
}
|
}
|
||||||
if (empty($param[ACCOUNTING_EXPORT_DATE])) {
|
if (empty($param['ACCOUNTING_EXPORT_DATE'])) {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'."\n";
|
||||||
} else {
|
} else {
|
||||||
@ -257,15 +257,15 @@ if ($num2) {
|
|||||||
print '<tr class="oddeven value">';
|
print '<tr class="oddeven value">';
|
||||||
|
|
||||||
// Param
|
// Param
|
||||||
$label = $key[label];
|
$label = $key['label'];
|
||||||
print '<td width="50%">' . $langs->trans($label) . '</td>';
|
print '<td width="50%">' . $langs->trans($label) . '</td>';
|
||||||
|
|
||||||
// Value
|
// Value
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (is_array($key[param])) {
|
if (is_array($key['param'])) {
|
||||||
print $form->selectarray($label, $key[param], $conf->global->$label, 0);
|
print $form->selectarray($label, $key['param'], $conf->global->$label, 0);
|
||||||
} else {
|
} else {
|
||||||
print '<input type="text" size="20" id="'. $label .'" name="' . $key[label] . '" value="' . $conf->global->$label . '">';
|
print '<input type="text" size="20" id="'. $label .'" name="' . $key['label'] . '" value="' . $conf->global->$label . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -278,5 +278,6 @@ print '<div class="center"><input type="submit" class="button" value="' . dol_es
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -156,6 +156,6 @@ if ($result)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -169,12 +170,12 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
|
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
|
||||||
print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear');
|
print $form->selectDate(($date_start ? $date_start : ''), 'fiscalyear');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date end
|
// Date end
|
||||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
|
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
|
||||||
print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend');
|
print $form->selectDate(($date_end ? $date_end : - 1), 'fiscalyearend');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -225,12 +226,12 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
|
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
|
||||||
print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear');
|
print $form->selectDate($object->date_start ? $object->date_start : - 1, 'fiscalyear');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date end
|
// Date end
|
||||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
|
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
|
||||||
print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend');
|
print $form->selectDate($object->date_end ? $object->date_end : - 1, 'fiscalyearend');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
@ -318,5 +319,6 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -58,5 +58,6 @@ if ($id) {
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -181,5 +181,6 @@ if ($result) {
|
|||||||
print $db->error();
|
print $db->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -295,5 +295,6 @@ print '<br>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -128,16 +128,16 @@ complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,
|
|||||||
|
|
||||||
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
||||||
$elementList = array();
|
$elementList = array();
|
||||||
// Must match ids defined into eldy.lib.php
|
// Must match ids defined into eldy.lib.php
|
||||||
$sourceList = array(
|
$sourceList = array(
|
||||||
'1' => $langs->trans('AccountingJournalType1'),
|
'1' => $langs->trans('AccountingJournalType1'),
|
||||||
'2' => $langs->trans('AccountingJournalType2'),
|
'2' => $langs->trans('AccountingJournalType2'),
|
||||||
'3' => $langs->trans('AccountingJournalType3'),
|
'3' => $langs->trans('AccountingJournalType3'),
|
||||||
'4' => $langs->trans('AccountingJournalType4'),
|
'4' => $langs->trans('AccountingJournalType4'),
|
||||||
'5' => $langs->trans('AccountingJournalType5'),
|
'5' => $langs->trans('AccountingJournalType5'),
|
||||||
'8' => $langs->trans('AccountingJournalType8'),
|
'8' => $langs->trans('AccountingJournalType8'),
|
||||||
'9' => $langs->trans('AccountingJournalType9')
|
'9' => $langs->trans('AccountingJournalType9'),
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -294,10 +294,10 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST('actioncancel'))
|
//if (GETPOST('actioncancel'))
|
||||||
{
|
//{
|
||||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
// $_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||||
}
|
//}
|
||||||
|
|
||||||
if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
||||||
{
|
{
|
||||||
@ -683,7 +683,7 @@ if ($id)
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -495,5 +495,6 @@ if ($result)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -193,9 +194,9 @@ else {
|
|||||||
|
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= $langs->trans('DateStart') . ': ';
|
$moreforfilter .= $langs->trans('DateStart') . ': ';
|
||||||
$moreforfilter .= $form->select_date($search_date_start?$search_date_start:-1, 'date_start', 0, 0, 1, '', 1, 0, 1);
|
$moreforfilter .= $form->selectDate($search_date_start?$search_date_start:-1, 'date_start', 0, 0, 1, '', 1, 0);
|
||||||
$moreforfilter .= $langs->trans('DateEnd') . ': ';
|
$moreforfilter .= $langs->trans('DateEnd') . ': ';
|
||||||
$moreforfilter .= $form->select_date($search_date_end?$search_date_end:-1, 'date_end', 0, 0, 1, '', 1, 0, 1);
|
$moreforfilter .= $form->selectDate($search_date_end?$search_date_end:-1, 'date_end', 0, 0, 1, '', 1, 0);
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
if (! empty($moreforfilter)) {
|
if (! empty($moreforfilter)) {
|
||||||
@ -298,7 +299,8 @@ else {
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
llxFooter();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -140,5 +140,6 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -350,7 +351,7 @@ if ($action == 'create')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="titlefieldcreate fieldrequired">' . $langs->trans("Docdate") . '</td>';
|
print '<td class="titlefieldcreate fieldrequired">' . $langs->trans("Docdate") . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1);
|
print $html->selectDate('', 'doc_date', '', '', '', "create_mvt", 1, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -432,7 +433,7 @@ if ($action == 'create')
|
|||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||||
print '<input type="hidden" name="action" value="setdate">';
|
print '<input type="hidden" name="action" value="setdate">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
$form->select_date($object->doc_date ? $object->doc_date : - 1, 'doc_date', '', '', '', "setdate");
|
print $form->selectDate($object->doc_date ? $object->doc_date : - 1, 'doc_date', '', '', '', "setdate");
|
||||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
@ -714,5 +715,6 @@ if ($action == 'create')
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -465,11 +466,11 @@ if (! empty($arrayfields['t.doc_date']['checked']))
|
|||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('From') . ' ';
|
print $langs->trans('From') . ' ';
|
||||||
print $form->select_date($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1);
|
print $form->selectDate($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('to') . ' ';
|
print $langs->trans('to') . ' ';
|
||||||
print $form->select_date($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1);
|
print $form->selectDate($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -556,11 +557,11 @@ if (! empty($arrayfields['t.date_creation']['checked']))
|
|||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('From') . ' ';
|
print $langs->trans('From') . ' ';
|
||||||
print $form->select_date($search_date_creation_start, 'date_creation_start', 0, 0, 1);
|
print $form->selectDate($search_date_creation_start, 'date_creation_start', 0, 0, 1);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('to') . ' ';
|
print $langs->trans('to') . ' ';
|
||||||
print $form->select_date($search_date_creation_end, 'date_creation_end', 0, 0, 1);
|
print $form->selectDate($search_date_creation_end, 'date_creation_end', 0, 0, 1);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -570,11 +571,11 @@ if (! empty($arrayfields['t.tms']['checked']))
|
|||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('From') . ' ';
|
print $langs->trans('From') . ' ';
|
||||||
print $form->select_date($search_date_modification_start, 'date_modification_start', 0, 0, 1);
|
print $form->selectDate($search_date_modification_start, 'date_modification_start', 0, 0, 1);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $langs->trans('to') . ' ';
|
print $langs->trans('to') . ' ';
|
||||||
print $form->select_date($search_date_modification_end, 'date_modification_end', 0, 0, 1);
|
print $form->selectDate($search_date_modification_end, 'date_modification_end', 0, 0, 1);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -748,6 +749,6 @@ print '</div>';
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -287,10 +288,10 @@ print '</td>';
|
|||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print $langs->trans('From') . ': ';
|
print $langs->trans('From') . ': ';
|
||||||
print $form->select_date($search_date_start, 'search_date_start', 0, 0, 1);
|
print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print $langs->trans('to') . ': ';
|
print $langs->trans('to') . ': ';
|
||||||
print $form->select_date($search_date_end, 'search_date_end', 0, 0, 1);
|
print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_doc_ref" value="' . dol_escape_htmltag($search_doc_ref) . '"/></td>';
|
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_doc_ref" value="' . dol_escape_htmltag($search_doc_ref) . '"/></td>';
|
||||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_operation" value="' . dol_escape_htmltag($search_label_operation) . '"/></td>';
|
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_operation" value="' . dol_escape_htmltag($search_label_operation) . '"/></td>';
|
||||||
@ -421,5 +422,6 @@ print '</tr>';
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file accounting/bookkeeping/thirdparty_lettrage.php
|
* \file accountancy/bookkeeping/thirdparty_lettrage.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Onglet de gestion de parametrages des ventilations
|
* \brief Onglet de gestion de parametrages des ventilations
|
||||||
*/
|
*/
|
||||||
@ -82,8 +82,9 @@ $socid = GETPOST("socid", 'int');
|
|||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
$object->id = $socid;
|
$object->id = $socid;
|
||||||
$result = $object->fetch($socid);
|
$result = $object->fetch($socid);
|
||||||
if ($result < 0) {
|
if ($result < 0)
|
||||||
setEventMessage($object->error, 'errors');
|
{
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -252,7 +253,6 @@ if ($resql) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var = false;
|
|
||||||
$solde = 0;
|
$solde = 0;
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
while ( $obj = $db->fetch_object($resql) ) {
|
while ( $obj = $db->fetch_object($resql) ) {
|
||||||
@ -261,11 +261,10 @@ if ($resql) {
|
|||||||
$tmp = $obj->lettering_code;
|
$tmp = $obj->lettering_code;
|
||||||
|
|
||||||
if ($tmp != $obj->lettering_code || empty($obj->lettering_code))
|
if ($tmp != $obj->lettering_code || empty($obj->lettering_code))
|
||||||
$var = ! $var;
|
|
||||||
|
|
||||||
$solde += ($obj->credit - $obj->debit);
|
$solde += ($obj->credit - $obj->debit);
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
if (empty($obj->lettering_code)) {
|
if (empty($obj->lettering_code)) {
|
||||||
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
|
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
|
||||||
@ -293,14 +292,13 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
print '<td colspan="4">Mouvement totaux</td>' . "\n";
|
print '<td colspan="4">Mouvement totaux</td>' . "\n";
|
||||||
print '<td><strong>' . price($debit) . '</strong></td>';
|
print '<td><strong>' . price($debit) . '</strong></td>';
|
||||||
print '<td><strong>' . price($credit) . '</strong></td>';
|
print '<td><strong>' . price($credit) . '</strong></td>';
|
||||||
print '<td colspan="5"></td>';
|
print '<td colspan="5"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print '<tr class="oddeven">';
|
||||||
print '<td colspan="9">Solde Comptable</td>' . "\n";
|
print '<td colspan="9">Solde Comptable</td>' . "\n";
|
||||||
print '<td><strong>' . price($credit - $debit) . '</strong></td>';
|
print '<td><strong>' . price($credit - $debit) . '</strong></td>';
|
||||||
print '<td colspan="5"></td>';
|
print '<td colspan="5"></td>';
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file accounting/bookkeeping/thirdparty_lettrage.php
|
* \file accountancy/bookkeeping/thirdparty_lettrage_supplier.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Tab to setup lettering
|
* \brief Tab to setup lettering
|
||||||
*/
|
*/
|
||||||
@ -86,8 +86,9 @@ $socid = GETPOST("socid", 'int');
|
|||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
$object->id = $socid;
|
$object->id = $socid;
|
||||||
$result = $object->fetch($socid);
|
$result = $object->fetch($socid);
|
||||||
if ($result<0) {
|
if ($result<0)
|
||||||
setEventMessage($object->error,'errors');
|
{
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -133,7 +134,7 @@ if (!empty($search_doc_ref)) $param.='&search_doc_ref='.$search_doc_ref;
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage onglets
|
* Display tabs
|
||||||
*/
|
*/
|
||||||
$head = societe_prepare_head($object);
|
$head = societe_prepare_head($object);
|
||||||
|
|
||||||
@ -272,7 +273,6 @@ if ($resql) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var = false;
|
|
||||||
$solde = 0;
|
$solde = 0;
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
while ($obj = $db->fetch_object($resql)) {
|
while ($obj = $db->fetch_object($resql)) {
|
||||||
@ -281,11 +281,10 @@ if ($resql) {
|
|||||||
$tmp = $obj->lettering_code;
|
$tmp = $obj->lettering_code;
|
||||||
|
|
||||||
if ($tmp != $obj->lettering_code || empty($obj->lettering_code))
|
if ($tmp != $obj->lettering_code || empty($obj->lettering_code))
|
||||||
$var = ! $var;
|
|
||||||
|
|
||||||
$solde += ($obj->credit - $obj->debit);
|
$solde += ($obj->credit - $obj->debit);
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
if (empty($obj->lettering_code)) {
|
if (empty($obj->lettering_code)) {
|
||||||
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
|
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
|
||||||
@ -320,7 +319,7 @@ if ($resql) {
|
|||||||
print '<td colspan="5"></td>';
|
print '<td colspan="5"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print '<tr class="oddeven">';
|
||||||
print '<td colspan="9">Solde Comptable</td>' . "\n";
|
print '<td colspan="9">Solde Comptable</td>' . "\n";
|
||||||
print '<td><strong>' . price($credit - $debit) . '</strong></td>';
|
print '<td><strong>' . price($credit - $debit) . '</strong></td>';
|
||||||
print '<td colspan="5"></td>';
|
print '<td colspan="5"></td>';
|
||||||
|
|||||||
@ -30,25 +30,95 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
|||||||
*/
|
*/
|
||||||
class AccountancyCategory // extends CommonObject
|
class AccountancyCategory // extends CommonObject
|
||||||
{
|
{
|
||||||
public $db; //!< To store db handler
|
/**
|
||||||
public $error; //!< To return error code (or message)
|
* @var DoliDB Database handler.
|
||||||
public $errors=array(); //!< To return several error codes (or messages)
|
*/
|
||||||
public $element='c_accounting_category'; //!< Id that identify managed objects
|
public $db;
|
||||||
public $table_element='c_accounting_category'; //!< Name of table without prefix where object is stored
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Error string
|
||||||
|
* @see errors
|
||||||
|
*/
|
||||||
|
public $error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[] Error codes (or messages)
|
||||||
|
*/
|
||||||
|
public $errors = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string ID to identify managed object
|
||||||
|
*/
|
||||||
|
public $element='c_accounting_category';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
|
public $table_element='c_accounting_category';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $code;
|
public $code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Accountancy Category label
|
||||||
|
*/
|
||||||
public $label;
|
public $label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $range_account;
|
public $range_account;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $sens;
|
public $sens;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $category_type;
|
public $category_type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $formula;
|
public $formula;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $position;
|
public $position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $fk_country;
|
public $fk_country;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $active;
|
public $active;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $lines_cptbk;
|
public $lines_cptbk;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $lines_display;
|
public $lines_display;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var mixed Sample property 1
|
||||||
|
*/
|
||||||
public $sdc;
|
public $sdc;
|
||||||
|
|
||||||
|
|
||||||
@ -125,18 +195,18 @@ class AccountancyCategory // extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."c_accounting_category");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."c_accounting_category");
|
||||||
|
|
||||||
if (! $notrigger)
|
|
||||||
{
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action call a trigger.
|
// want this action call a trigger.
|
||||||
|
//if (! $notrigger)
|
||||||
|
//{
|
||||||
|
|
||||||
//// Call triggers
|
// // Call triggers
|
||||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
//$interface=new Interfaces($this->db);
|
// $interface=new Interfaces($this->db);
|
||||||
//$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
|
// $result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
|
||||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
//// End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -263,19 +333,18 @@ class AccountancyCategory // extends CommonObject
|
|||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
|
||||||
if (! $notrigger)
|
|
||||||
{
|
{
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action call a trigger.
|
// want this action call a trigger.
|
||||||
|
//if (! $notrigger)
|
||||||
//// Call triggers
|
//{
|
||||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
// // Call triggers
|
||||||
//$interface=new Interfaces($this->db);
|
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
// $interface=new Interfaces($this->db);
|
||||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
// $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
||||||
//// End call triggers
|
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
}
|
// // End call triggers
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -319,19 +388,18 @@ class AccountancyCategory // extends CommonObject
|
|||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
|
||||||
if (! $notrigger)
|
|
||||||
{
|
{
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action call a trigger.
|
// want this action call a trigger.
|
||||||
|
//if (! $notrigger)
|
||||||
//// Call triggers
|
//{
|
||||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
// // Call triggers
|
||||||
//$interface=new Interfaces($this->db);
|
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
|
// $interface=new Interfaces($this->db);
|
||||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
// $result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
|
||||||
//// End call triggers
|
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
}
|
// // End call triggers
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -359,7 +427,8 @@ class AccountancyCategory // extends CommonObject
|
|||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function display($id) {
|
public function display($id)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$sql = "SELECT t.rowid, t.account_number, t.label";
|
$sql = "SELECT t.rowid, t.account_number, t.label";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
|
||||||
@ -394,7 +463,8 @@ class AccountancyCategory // extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function getCptBK($id) {
|
public function getCptBK($id)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT t.numero_compte, t.label_operation, t.doc_ref";
|
$sql = "SELECT t.numero_compte, t.label_operation, t.doc_ref";
|
||||||
@ -442,7 +512,8 @@ class AccountancyCategory // extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function getAccountsWithNoCategory($id) {
|
public function getAccountsWithNoCategory($id)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT aa.account_number as numero_compte, aa.label as label_compte";
|
$sql = "SELECT aa.account_number as numero_compte, aa.label as label_compte";
|
||||||
@ -485,7 +556,8 @@ class AccountancyCategory // extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function updateAccAcc($id_cat, $cpts = array()) {
|
public function updateAccAcc($id_cat, $cpts = array())
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -548,7 +620,8 @@ class AccountancyCategory // extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function deleteCptCat($cpt_id) {
|
public function deleteCptCat($cpt_id)
|
||||||
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account as aa";
|
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
@ -799,5 +872,4 @@ class AccountancyCategory // extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,11 +55,11 @@ class AccountancyExport
|
|||||||
public static $EXPORT_TYPE_AGIRIS = 9;
|
public static $EXPORT_TYPE_AGIRIS = 9;
|
||||||
public static $EXPORT_TYPE_CONFIGURABLE = 10;
|
public static $EXPORT_TYPE_CONFIGURABLE = 10;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @var string[] Error codes (or messages)
|
* @var string[] Error codes (or messages)
|
||||||
*/
|
*/
|
||||||
public $errors = array ();
|
public $errors = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -78,7 +78,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @param DoliDb $db Database handler
|
* @param DoliDb $db Database handler
|
||||||
*/
|
*/
|
||||||
public function __construct(DoliDB &$db) {
|
public function __construct(DoliDB &$db)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db = &$db;
|
$this->db = &$db;
|
||||||
@ -91,7 +92,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return array of type
|
* @return array of type
|
||||||
*/
|
*/
|
||||||
public static function getType() {
|
public static function getType()
|
||||||
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
return array (
|
return array (
|
||||||
@ -113,7 +115,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return array of type
|
* @return array of type
|
||||||
*/
|
*/
|
||||||
public static function getTypeConfig() {
|
public static function getTypeConfig()
|
||||||
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
return array (
|
return array (
|
||||||
@ -175,7 +178,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function downloadFile() {
|
public static function downloadFile()
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$filename = 'general_ledger';
|
$filename = 'general_ledger';
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
@ -185,8 +189,10 @@ class AccountancyExport
|
|||||||
* Function who chose which export to use with the default config
|
* Function who chose which export to use with the default config
|
||||||
*
|
*
|
||||||
* @param unknown $TData data
|
* @param unknown $TData data
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function export(&$TData) {
|
public function export(&$TData)
|
||||||
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
self::downloadFile();
|
self::downloadFile();
|
||||||
@ -235,7 +241,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportNormal($objectLines) {
|
public function exportNormal($objectLines)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ( $objectLines as $line ) {
|
||||||
@ -259,7 +266,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportCegid($objectLines) {
|
public function exportCegid($objectLines)
|
||||||
|
{
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ( $objectLines as $line ) {
|
||||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
$separator = ";";
|
$separator = ";";
|
||||||
@ -284,7 +292,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportCogilog($objectLines) {
|
public function exportCogilog($objectLines)
|
||||||
|
{
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ( $objectLines as $line ) {
|
||||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
$separator = ";";
|
$separator = ";";
|
||||||
@ -317,7 +326,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportCoala($objectLines) {
|
public function exportCoala($objectLines)
|
||||||
|
{
|
||||||
// Coala export
|
// Coala export
|
||||||
$separator = ";";
|
$separator = ";";
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
@ -344,7 +354,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportBob50($objectLines) {
|
public function exportBob50($objectLines)
|
||||||
|
{
|
||||||
|
|
||||||
// Bob50
|
// Bob50
|
||||||
$separator = ";";
|
$separator = ";";
|
||||||
@ -382,7 +393,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportCiel(&$TData) {
|
public function exportCiel(&$TData)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$end_line ="\r\n";
|
$end_line ="\r\n";
|
||||||
@ -422,7 +434,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportQuadratus(&$TData) {
|
public function exportQuadratus(&$TData)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$end_line ="\r\n";
|
$end_line ="\r\n";
|
||||||
@ -505,7 +518,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportEbp($objectLines) {
|
public function exportEbp($objectLines)
|
||||||
|
{
|
||||||
|
|
||||||
$separator = ',';
|
$separator = ',';
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
@ -537,7 +551,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportAgiris($objectLines) {
|
public function exportAgiris($objectLines)
|
||||||
|
{
|
||||||
|
|
||||||
$separator = ';';
|
$separator = ';';
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
@ -574,7 +589,8 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportConfigurable($objectLines) {
|
public function exportConfigurable($objectLines)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
foreach ($objectLines as $line) {
|
foreach ($objectLines as $line) {
|
||||||
@ -602,8 +618,10 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @param unknown $str data
|
* @param unknown $str data
|
||||||
* @param integer $size data
|
* @param integer $size data
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function trunc($str, $size) {
|
public static function trunc($str, $size)
|
||||||
|
{
|
||||||
return dol_trunc($str, $size, 'right', 'UTF-8', 1);
|
return dol_trunc($str, $size, 'right', 'UTF-8', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,13 +28,26 @@
|
|||||||
*/
|
*/
|
||||||
class AccountancySystem
|
class AccountancySystem
|
||||||
{
|
{
|
||||||
var $db;
|
/**
|
||||||
var $error;
|
* @var DoliDB Database handler.
|
||||||
|
*/
|
||||||
|
public $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Error code (or message)
|
||||||
|
*/
|
||||||
|
public $error='';
|
||||||
|
|
||||||
var $rowid;
|
var $rowid;
|
||||||
var $fk_pcg_version;
|
var $fk_pcg_version;
|
||||||
var $pcg_type;
|
var $pcg_type;
|
||||||
var $pcg_subtype;
|
var $pcg_subtype;
|
||||||
var $label;
|
|
||||||
|
/**
|
||||||
|
* @var string Accountancy System label
|
||||||
|
*/
|
||||||
|
public $label;
|
||||||
|
|
||||||
var $account_number;
|
var $account_number;
|
||||||
var $account_parent;
|
var $account_parent;
|
||||||
|
|
||||||
@ -43,7 +56,8 @@ class AccountancySystem
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db handler
|
* @param DoliDB $db handler
|
||||||
*/
|
*/
|
||||||
function __construct($db) {
|
function __construct($db)
|
||||||
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +116,8 @@ class AccountancySystem
|
|||||||
* @param User $user making insert
|
* @param User $user making insert
|
||||||
* @return int if KO, Id of line if OK
|
* @return int if KO, Id of line if OK
|
||||||
*/
|
*/
|
||||||
function create($user) {
|
function create($user)
|
||||||
|
{
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_system";
|
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_system";
|
||||||
|
|||||||
@ -31,7 +31,15 @@
|
|||||||
class AccountingAccount extends CommonObject
|
class AccountingAccount extends CommonObject
|
||||||
{
|
{
|
||||||
public $element='accounting_account';
|
public $element='accounting_account';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
public $table_element='accounting_account';
|
public $table_element='accounting_account';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
|
*/
|
||||||
public $picto = 'billr';
|
public $picto = 'billr';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,29 +47,63 @@ class AccountingAccount extends CommonObject
|
|||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $ismultientitymanaged = 1;
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
||||||
* @var integer
|
* @var integer
|
||||||
*/
|
*/
|
||||||
public $restrictiononfksoc = 1;
|
public $restrictiononfksoc = 1;
|
||||||
|
|
||||||
var $db;
|
/**
|
||||||
var $error;
|
* @var DoliDB Database handler.
|
||||||
var $errors;
|
*/
|
||||||
var $id;
|
public $db;
|
||||||
var $rowid;
|
|
||||||
var $datec; // Creation date
|
/**
|
||||||
var $fk_pcg_version;
|
* @var string Error code (or message)
|
||||||
var $pcg_type;
|
*/
|
||||||
var $pcg_subtype;
|
public $error='';
|
||||||
var $account_number;
|
|
||||||
var $account_parent;
|
/**
|
||||||
var $account_category;
|
* @var string[] Error codes (or messages)
|
||||||
var $label;
|
*/
|
||||||
var $fk_user_author;
|
public $errors = array();
|
||||||
var $fk_user_modif;
|
|
||||||
var $active; // duplicate with status
|
/**
|
||||||
var $status;
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $rowid;
|
||||||
|
|
||||||
|
public $datec; // Creation date
|
||||||
|
public $fk_pcg_version;
|
||||||
|
public $pcg_type;
|
||||||
|
public $pcg_subtype;
|
||||||
|
public $account_number;
|
||||||
|
public $account_parent;
|
||||||
|
public $account_category;
|
||||||
|
public $status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Label of account
|
||||||
|
*/
|
||||||
|
public $label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $fk_user_author;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $fk_user_modif;
|
||||||
|
|
||||||
|
public $active; // duplicate with status
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,7 +111,8 @@ class AccountingAccount extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handle
|
* @param DoliDB $db Database handle
|
||||||
*/
|
*/
|
||||||
function __construct($db) {
|
function __construct($db)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
@ -146,7 +189,8 @@ class AccountingAccount extends CommonObject
|
|||||||
* @param int $notrigger Disable triggers
|
* @param int $notrigger Disable triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function create($user, $notrigger = 0) {
|
function create($user, $notrigger = 0)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
@ -297,7 +341,8 @@ class AccountingAccount extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function checkUsage() {
|
function checkUsage()
|
||||||
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$sql = "(SELECT fk_code_ventilation FROM " . MAIN_DB_PREFIX . "facturedet";
|
$sql = "(SELECT fk_code_ventilation FROM " . MAIN_DB_PREFIX . "facturedet";
|
||||||
@ -330,7 +375,8 @@ class AccountingAccount extends CommonObject
|
|||||||
* @param int $notrigger 0=triggers after, 1=disable triggers
|
* @param int $notrigger 0=triggers after, 1=disable triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function delete($user, $notrigger = 0) {
|
function delete($user, $notrigger = 0)
|
||||||
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$result = $this->checkUsage();
|
$result = $this->checkUsage();
|
||||||
@ -457,7 +503,8 @@ class AccountingAccount extends CommonObject
|
|||||||
* @param int $id of record
|
* @param int $id of record
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function info($id) {
|
function info($id)
|
||||||
|
{
|
||||||
$sql = 'SELECT a.rowid, a.datec, a.fk_user_author, a.fk_user_modif, a.tms';
|
$sql = 'SELECT a.rowid, a.datec, a.fk_user_author, a.fk_user_modif, a.tms';
|
||||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as a';
|
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as a';
|
||||||
$sql .= ' WHERE a.rowid = ' . $id;
|
$sql .= ' WHERE a.rowid = ' . $id;
|
||||||
@ -488,13 +535,16 @@ class AccountingAccount extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Account deactivated
|
* Account deactivated
|
||||||
*
|
*
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function account_desactivate($id) {
|
function account_desactivate($id)
|
||||||
|
{
|
||||||
|
// phpcs:enable
|
||||||
$result = $this->checkUsage();
|
$result = $this->checkUsage();
|
||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
@ -520,13 +570,16 @@ class AccountingAccount extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Account activated
|
* Account activated
|
||||||
*
|
*
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function account_activate($id) {
|
function account_activate($id)
|
||||||
|
{
|
||||||
|
// phpcs:enable
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
||||||
@ -557,6 +610,7 @@ class AccountingAccount extends CommonObject
|
|||||||
return $this->LibStatut($this->status,$mode);
|
return $this->LibStatut($this->status,$mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoi le libelle d'un statut donne
|
* Renvoi le libelle d'un statut donne
|
||||||
*
|
*
|
||||||
@ -566,6 +620,7 @@ class AccountingAccount extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function LibStatut($statut,$mode=0)
|
function LibStatut($statut,$mode=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->loadLangs(array("users"));
|
$langs->loadLangs(array("users"));
|
||||||
|
|
||||||
@ -575,27 +630,27 @@ class AccountingAccount extends CommonObject
|
|||||||
if ($statut == 1) return $langs->trans('Enabled');
|
if ($statut == 1) return $langs->trans('Enabled');
|
||||||
if ($statut == 0) return $langs->trans('Disabled');
|
if ($statut == 0) return $langs->trans('Disabled');
|
||||||
}
|
}
|
||||||
if ($mode == 1)
|
elseif ($mode == 1)
|
||||||
{
|
{
|
||||||
if ($statut == 1) return $langs->trans('Enabled');
|
if ($statut == 1) return $langs->trans('Enabled');
|
||||||
if ($statut == 0) return $langs->trans('Disabled');
|
if ($statut == 0) return $langs->trans('Disabled');
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
elseif ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
elseif ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4');
|
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4');
|
||||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5');
|
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
elseif ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
elseif ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
if ($statut == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
||||||
if ($statut == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
if ($statut == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
||||||
|
|||||||
@ -26,16 +26,40 @@
|
|||||||
*/
|
*/
|
||||||
class AccountingJournal extends CommonObject
|
class AccountingJournal extends CommonObject
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string ID to identify managed object
|
||||||
|
*/
|
||||||
public $element='accounting_journal';
|
public $element='accounting_journal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
public $table_element='accounting_journal';
|
public $table_element='accounting_journal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Field with ID of parent key if this field has a parent
|
||||||
|
*/
|
||||||
public $fk_element = '';
|
public $fk_element = '';
|
||||||
|
|
||||||
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
|
*/
|
||||||
public $picto = 'generic';
|
public $picto = 'generic';
|
||||||
|
|
||||||
var $rowid;
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $rowid;
|
||||||
|
|
||||||
public $code;
|
public $code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Accounting Journal label
|
||||||
|
*/
|
||||||
public $label;
|
public $label;
|
||||||
|
|
||||||
public $nature; // 1:various operations, 2:sale, 3:purchase, 4:bank, 5:expense-report, 8:inventory, 9: has-new
|
public $nature; // 1:various operations, 2:sale, 3:purchase, 4:bank, 5:expense-report, 8:inventory, 9: has-new
|
||||||
public $active;
|
public $active;
|
||||||
|
|
||||||
@ -46,7 +70,8 @@ class AccountingJournal extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handle
|
* @param DoliDB $db Database handle
|
||||||
*/
|
*/
|
||||||
function __construct($db) {
|
function __construct($db)
|
||||||
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +142,8 @@ class AccountingJournal extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
|
function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
||||||
|
{
|
||||||
$sql = "SELECT rowid, code, label, nature, active";
|
$sql = "SELECT rowid, code, label, nature, active";
|
||||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
||||||
// Manage filter
|
// Manage filter
|
||||||
@ -245,6 +271,7 @@ class AccountingJournal extends CommonObject
|
|||||||
return $this->LibType($this->nature,$mode);
|
return $this->LibType($this->nature,$mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return type of an accounting journal
|
* Return type of an accounting journal
|
||||||
*
|
*
|
||||||
@ -254,6 +281,7 @@ class AccountingJournal extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function LibType($nature,$mode=0)
|
function LibType($nature,$mode=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$langs->loadLangs(array("accountancy"));
|
$langs->loadLangs(array("accountancy"));
|
||||||
|
|||||||
@ -35,19 +35,25 @@ class BookKeeping extends CommonObject
|
|||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
public $error;
|
public $error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Error codes (or messages)
|
* @var string[] Error codes (or messages)
|
||||||
*/
|
*/
|
||||||
public $errors = array ();
|
public $errors = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Id to identify managed objects
|
* @var string Id to identify managed objects
|
||||||
*/
|
*/
|
||||||
public $element = 'accountingbookkeeping';
|
public $element = 'accountingbookkeeping';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element = 'accounting_bookkeeping';
|
public $table_element = 'accounting_bookkeeping';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Entity
|
||||||
|
*/
|
||||||
public $entity;
|
public $entity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,8 +65,7 @@ class BookKeeping extends CommonObject
|
|||||||
* @var int ID
|
* @var int ID
|
||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public $doc_date;
|
public $doc_date;
|
||||||
public $date_lim_reglement;
|
public $date_lim_reglement;
|
||||||
public $doc_type;
|
public $doc_type;
|
||||||
@ -88,7 +93,8 @@ class BookKeeping extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param DoliDb $db Database handler
|
* @param DoliDb $db Database handler
|
||||||
*/
|
*/
|
||||||
public function __construct(DoliDB $db) {
|
public function __construct(DoliDB $db)
|
||||||
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +105,8 @@ class BookKeeping extends CommonObject
|
|||||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||||
* @return int <0 if KO, Id of created object if OK
|
* @return int <0 if KO, Id of created object if OK
|
||||||
*/
|
*/
|
||||||
public function create(User $user, $notrigger = false) {
|
public function create(User $user, $notrigger = false)
|
||||||
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
@ -328,18 +335,15 @@ class BookKeeping extends CommonObject
|
|||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error) {
|
|
||||||
|
|
||||||
if (! $notrigger) {
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action to call a trigger.
|
// want this action to call a trigger.
|
||||||
|
//if (! $error && ! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||||
// if ($result < 0) $error++;
|
// if ($result < 0) $error++;
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@ -420,7 +424,8 @@ class BookKeeping extends CommonObject
|
|||||||
* @param string $mode Mode
|
* @param string $mode Mode
|
||||||
* @return int <0 if KO, Id of created object if OK
|
* @return int <0 if KO, Id of created object if OK
|
||||||
*/
|
*/
|
||||||
public function createStd(User $user, $notrigger = false, $mode='') {
|
public function createStd(User $user, $notrigger = false, $mode='')
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
@ -558,15 +563,15 @@ class BookKeeping extends CommonObject
|
|||||||
if (! $error) {
|
if (! $error) {
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode);
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode);
|
||||||
|
|
||||||
if (! $notrigger) {
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action to call a trigger.
|
// want this action to call a trigger.
|
||||||
|
//if (! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||||
// if ($result < 0) $error++;
|
// if ($result < 0) $error++;
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -590,7 +595,8 @@ class BookKeeping extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function fetch($id, $ref = null, $mode='') {
|
public function fetch($id, $ref = null, $mode='')
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
@ -687,7 +693,8 @@ class BookKeeping extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
public function fetchAllByAccount($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
|
public function fetchAllByAccount($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
@ -811,7 +818,8 @@ class BookKeeping extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
|
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
@ -1016,7 +1024,8 @@ class BookKeeping extends CommonObject
|
|||||||
* @param string $mode Mode
|
* @param string $mode Mode
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function update(User $user, $notrigger = false, $mode='') {
|
public function update(User $user, $notrigger = false, $mode='')
|
||||||
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
@ -1119,15 +1128,15 @@ class BookKeeping extends CommonObject
|
|||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error && ! $notrigger) {
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// want this action calls a trigger.
|
||||||
|
//if (! $error && ! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// $result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@ -1185,24 +1194,23 @@ class BookKeeping extends CommonObject
|
|||||||
* @param string $mode Mode
|
* @param string $mode Mode
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function delete(User $user, $notrigger = false, $mode='') {
|
public function delete(User $user, $notrigger = false, $mode='')
|
||||||
|
{
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (! $error) {
|
|
||||||
if (! $notrigger) {
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// want this action calls a trigger.
|
||||||
|
//if (! $error && ! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
// $result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
||||||
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element.$mode;
|
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element.$mode;
|
||||||
@ -1234,7 +1242,8 @@ class BookKeeping extends CommonObject
|
|||||||
* @param string $importkey Import key
|
* @param string $importkey Import key
|
||||||
* @return int Result
|
* @return int Result
|
||||||
*/
|
*/
|
||||||
function deleteByImportkey($importkey) {
|
function deleteByImportkey($importkey)
|
||||||
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// first check if line not yet in bookkeeping
|
// first check if line not yet in bookkeeping
|
||||||
@ -1263,7 +1272,8 @@ class BookKeeping extends CommonObject
|
|||||||
* @param string $mode Mode
|
* @param string $mode Mode
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function deleteByYearAndJournal($delyear='', $journal='', $mode='') {
|
function deleteByYearAndJournal($delyear='', $journal='', $mode='')
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (empty($delyear) && empty($journal))
|
if (empty($delyear) && empty($journal))
|
||||||
@ -1302,7 +1312,8 @@ class BookKeeping extends CommonObject
|
|||||||
* @param int $piecenum Piecenum to delete
|
* @param int $piecenum Piecenum to delete
|
||||||
* @return int Result
|
* @return int Result
|
||||||
*/
|
*/
|
||||||
function deleteMvtNum($piecenum) {
|
function deleteMvtNum($piecenum)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -1336,7 +1347,8 @@ class BookKeeping extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int New id of clone
|
* @return int New id of clone
|
||||||
*/
|
*/
|
||||||
public function createFromClone($fromid) {
|
public function createFromClone($fromid)
|
||||||
|
{
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
@ -1381,7 +1393,8 @@ class BookKeeping extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function initAsSpecimen() {
|
public function initAsSpecimen()
|
||||||
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
@ -1417,7 +1430,8 @@ class BookKeeping extends CommonObject
|
|||||||
* @param string $mode Mode
|
* @param string $mode Mode
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function fetchPerMvt($piecenum, $mode='') {
|
public function fetchPerMvt($piecenum, $mode='')
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT piece_num,doc_date,code_journal,journal_label,doc_ref,doc_type,date_creation";
|
$sql = "SELECT piece_num,doc_date,code_journal,journal_label,doc_ref,doc_type,date_creation";
|
||||||
@ -1481,7 +1495,8 @@ class BookKeeping extends CommonObject
|
|||||||
* @param string $mode Mode
|
* @param string $mode Mode
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetchAllPerMvt($piecenum, $mode='') {
|
function fetchAllPerMvt($piecenum, $mode='')
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT rowid, doc_date, doc_type,";
|
$sql = "SELECT rowid, doc_date, doc_type,";
|
||||||
@ -1533,13 +1548,16 @@ class BookKeeping extends CommonObject
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Export bookkeping
|
* Export bookkeping
|
||||||
*
|
*
|
||||||
* @param string $model Model
|
* @param string $model Model
|
||||||
* @return int Result
|
* @return int Result
|
||||||
*/
|
*/
|
||||||
function export_bookkeping($model = 'ebp') {
|
function export_bookkeping($model = 'ebp')
|
||||||
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT rowid, doc_date, doc_type,";
|
$sql = "SELECT rowid, doc_date, doc_type,";
|
||||||
@ -1684,6 +1702,7 @@ class BookKeeping extends CommonObject
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of accounts with label by chart of accounts
|
* Return list of accounts with label by chart of accounts
|
||||||
*
|
*
|
||||||
@ -1696,7 +1715,9 @@ class BookKeeping extends CommonObject
|
|||||||
* @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
|
* @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
|
||||||
* @return string String with HTML select
|
* @return string String with HTML select
|
||||||
*/
|
*/
|
||||||
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') {
|
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '')
|
||||||
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
@ -1753,6 +1774,7 @@ class BookKeeping extends CommonObject
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Description of a root accounting account
|
* Description of a root accounting account
|
||||||
*
|
*
|
||||||
@ -1761,6 +1783,7 @@ class BookKeeping extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function get_compte_racine($account = null)
|
function get_compte_racine($account = null)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
|
|
||||||
@ -1793,6 +1816,7 @@ class BookKeeping extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Description of accounting account
|
* Description of accounting account
|
||||||
*
|
*
|
||||||
@ -1801,6 +1825,7 @@ class BookKeeping extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function get_compte_desc($account = null)
|
function get_compte_desc($account = null)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
@ -1838,7 +1863,11 @@ class BookKeeping extends CommonObject
|
|||||||
*/
|
*/
|
||||||
class BookKeepingLine
|
class BookKeepingLine
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
public $doc_date = '';
|
public $doc_date = '';
|
||||||
public $doc_type;
|
public $doc_type;
|
||||||
public $doc_ref;
|
public $doc_ref;
|
||||||
|
|||||||
@ -159,5 +159,6 @@ if (! empty($id)) {
|
|||||||
print "Error ID incorrect";
|
print "Error ID incorrect";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -89,7 +89,7 @@ if ($action == 'clean' || $action == 'validatehistory')
|
|||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ $y = $year_current;
|
|||||||
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -229,7 +229,7 @@ print '<br>';
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -309,7 +309,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
//print load_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -415,6 +415,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -400,6 +400,6 @@ if ($result) {
|
|||||||
print $db->lasterror();
|
print $db->lasterror();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -201,6 +201,7 @@ llxHeader('', $langs->trans("Ventilation"));
|
|||||||
if (empty($chartaccountcode))
|
if (empty($chartaccountcode))
|
||||||
{
|
{
|
||||||
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
exit;
|
exit;
|
||||||
@ -361,8 +362,8 @@ if ($result) {
|
|||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth25" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth25" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
||||||
print '<td class="liste_titre center nowraponall">';
|
print '<td class="liste_titre center nowraponall">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||||
$formother->select_year($search_year,'search_year',1, 20, 5);
|
$formother->select_year($search_year,'search_year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||||
@ -524,5 +525,6 @@ jQuery(document).ready(function() {
|
|||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -167,5 +167,6 @@ if (! empty($id)) {
|
|||||||
print "Error ID incorrect";
|
print "Error ID incorrect";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -86,7 +86,7 @@ if ($action == 'clean' || $action == 'validatehistory')
|
|||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ $buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' .
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -221,7 +221,7 @@ print '<br>';
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
@ -297,7 +297,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
//print load_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -345,5 +345,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -349,6 +349,6 @@ if ($result) {
|
|||||||
print $db->lasterror();
|
print $db->lasterror();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -180,6 +180,7 @@ llxHeader('', $langs->trans("ExpenseReportsVentilation"));
|
|||||||
if (empty($chartaccountcode))
|
if (empty($chartaccountcode))
|
||||||
{
|
{
|
||||||
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
exit;
|
exit;
|
||||||
@ -308,8 +309,8 @@ if ($result) {
|
|||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||||
$formother->select_year($search_year,'search_year',1, 20, 5);
|
$formother->select_year($search_year,'search_year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||||
@ -422,5 +423,6 @@ jQuery(document).ready(function() {
|
|||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -55,7 +55,7 @@ if ($conf->accounting->enabled)
|
|||||||
print $langs->trans("AccountancyAreaDescIntro")."<br>\n";
|
print $langs->trans("AccountancyAreaDescIntro")."<br>\n";
|
||||||
print "<br>\n";print "<br>\n";
|
print "<br>\n";print "<br>\n";
|
||||||
|
|
||||||
print_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."<br>\n";
|
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."<br>\n";
|
||||||
print '<hr>';
|
print '<hr>';
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ if ($conf->accounting->enabled)
|
|||||||
|
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print_fiche_titre('<span class="fa fa-calendar"></span> '.$langs->trans("AccountancyAreaDescActionFreq"), '', '');
|
print load_fiche_titre('<span class="fa fa-calendar"></span> '.$langs->trans("AccountancyAreaDescActionFreq"), '', '');
|
||||||
print '<hr>';
|
print '<hr>';
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step = 0;
|
$step = 0;
|
||||||
@ -163,5 +163,6 @@ else
|
|||||||
print $langs->trans("Module10Desc")."<br>\n";
|
print $langs->trans("Module10Desc")."<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -147,6 +147,7 @@ $paymentsalstatic = new PaymentSalary($db);
|
|||||||
$paymentexpensereportstatic = new PaymentExpenseReport($db);
|
$paymentexpensereportstatic = new PaymentExpenseReport($db);
|
||||||
$paymentvariousstatic = new PaymentVarious($db);
|
$paymentvariousstatic = new PaymentVarious($db);
|
||||||
$paymentloanstatic = new PaymentLoan($db);
|
$paymentloanstatic = new PaymentLoan($db);
|
||||||
|
$accountLinestatic=new AccountLine($db);
|
||||||
|
|
||||||
// Get code of finance journal
|
// Get code of finance journal
|
||||||
$accountingjournalstatic = new AccountingJournal($db);
|
$accountingjournalstatic = new AccountingJournal($db);
|
||||||
@ -370,7 +371,8 @@ if ($result) {
|
|||||||
$tabpay[$obj->rowid]["paymentloanid"] = $paymentloanstatic->id;
|
$tabpay[$obj->rowid]["paymentloanid"] = $paymentloanstatic->id;
|
||||||
//$tabtp[$obj->rowid][$account_pay_loan] += $obj->amount;
|
//$tabtp[$obj->rowid][$account_pay_loan] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'banktransfert') {
|
} else if ($links[$key]['type'] == 'banktransfert') {
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("BankTransfer");
|
$accountLinestatic->fetch($links[$key]['url_id']);
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1);
|
||||||
$tabtp[$obj->rowid][$account_transfer] += $obj->amount;
|
$tabtp[$obj->rowid][$account_transfer] += $obj->amount;
|
||||||
$bankaccountstatic->fetch($tabpay[$obj->rowid]['fk_bank_account']);
|
$bankaccountstatic->fetch($tabpay[$obj->rowid]['fk_bank_account']);
|
||||||
$tabpay[$obj->rowid]["soclib"] = $bankaccountstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["soclib"] = $bankaccountstatic->getNomUrl(2);
|
||||||
@ -850,7 +852,8 @@ if (empty($action) || $action == 'view') {
|
|||||||
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
||||||
|
|
||||||
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
|
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
|
||||||
$period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
|
$period = $form->selectDate($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0) . ' - ' . $form->selectDate($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0);
|
||||||
|
$period .= ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
|
||||||
|
|
||||||
$varlink = 'id_journal=' . $id_journal;
|
$varlink = 'id_journal=' . $id_journal;
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -534,7 +535,8 @@ if (empty($action) || $action == 'view') {
|
|||||||
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
||||||
|
|
||||||
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
|
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
|
||||||
$period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
|
$period = $form->selectDate($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0) . ' - ' . $form->selectDate($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0);
|
||||||
|
$period .= ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
|
||||||
|
|
||||||
$varlink = 'id_journal=' . $id_journal;
|
$varlink = 'id_journal=' . $id_journal;
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -726,7 +727,8 @@ if (empty($action) || $action == 'view') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
|
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
|
||||||
$period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
|
$period = $form->selectDate($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0) . ' - ' . $form->selectDate($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0);
|
||||||
|
$period .= ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
|
||||||
|
|
||||||
$varlink = 'id_journal=' . $id_journal;
|
$varlink = 'id_journal=' . $id_journal;
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -656,7 +657,8 @@ if (empty($action) || $action == 'view') {
|
|||||||
$description .= $langs->trans("DepositsAreIncluded");
|
$description .= $langs->trans("DepositsAreIncluded");
|
||||||
|
|
||||||
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
|
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
|
||||||
$period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
|
$period = $form->selectDate($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0) . ' - ' . $form->selectDate($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0);
|
||||||
|
$period .= ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
|
||||||
|
|
||||||
$varlink = 'id_journal=' . $id_journal;
|
$varlink = 'id_journal=' . $id_journal;
|
||||||
|
|
||||||
|
|||||||
@ -162,5 +162,6 @@ if (! empty($id)) {
|
|||||||
print "Error ID incorrect";
|
print "Error ID incorrect";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -87,7 +87,7 @@ if ($action == 'clean' || $action == 'validatehistory')
|
|||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ $buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' .
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -221,7 +221,7 @@ print '<br>';
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -295,7 +295,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
//print load_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -342,6 +342,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -406,7 +406,6 @@ if ($result) {
|
|||||||
print $db->lasterror();
|
print $db->lasterror();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -202,6 +202,7 @@ llxHeader('', $langs->trans("SuppliersVentilation"));
|
|||||||
if (empty($chartaccountcode))
|
if (empty($chartaccountcode))
|
||||||
{
|
{
|
||||||
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
exit;
|
exit;
|
||||||
@ -362,8 +363,8 @@ if ($result) {
|
|||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre center nowraponall">';
|
print '<td class="liste_titre center nowraponall">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||||
$formother->select_year($search_year,'search_year',1, 20, 5);
|
$formother->select_year($search_year,'search_year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||||
@ -532,5 +533,6 @@ jQuery(document).ready(function() {
|
|||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -33,8 +33,8 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("members");
|
$langs->loadLangs(array("admin","members"));
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -265,7 +265,6 @@ form_constantes($constantes, 0, $helptext);
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -33,8 +33,8 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("members");
|
$langs->loadLangs(array("admin","members"));
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -160,7 +160,6 @@ form_constantes($constantes, 0, $helptext);
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -28,8 +28,8 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
|
||||||
$langs->load("members");
|
// Load translation files required by the page
|
||||||
$langs->load("admin");
|
$langs->loadLangs(array("admin","members"));
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -113,6 +113,6 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -31,8 +31,8 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
|
||||||
$langs->load("members");
|
// Load translation files required by the page
|
||||||
$langs->load("admin");
|
$langs->loadLangs(array("admin","members"));
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -116,6 +116,6 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/adherents/admin/public.php
|
* \file htdocs/adherents/admin/website.php
|
||||||
* \ingroup member
|
* \ingroup member
|
||||||
* \brief File of main public page for member module
|
* \brief File of main public page for member module
|
||||||
* \author Laurent Destailleur
|
* \author Laurent Destailleur
|
||||||
@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
|
|
||||||
$langs->load("members");
|
// Load translation files required by the page
|
||||||
$langs->load("admin");
|
$langs->loadLangs(array("admin","members"));
|
||||||
|
|
||||||
$action=GETPOST('action', 'alpha');
|
$action=GETPOST('action', 'alpha');
|
||||||
|
|
||||||
@ -55,14 +55,12 @@ if ($action == 'update')
|
|||||||
$amount=GETPOST('MEMBER_NEWFORM_AMOUNT');
|
$amount=GETPOST('MEMBER_NEWFORM_AMOUNT');
|
||||||
$editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
$editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||||
$payonline=GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
$payonline=GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||||
$email=GETPOST('MEMBER_PAYONLINE_SENDEMAIL');
|
|
||||||
$forcetype=GETPOST('MEMBER_NEWFORM_FORCETYPE');
|
$forcetype=GETPOST('MEMBER_NEWFORM_FORCETYPE');
|
||||||
|
|
||||||
$res=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$public,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$public,'chaine',0,'',$conf->entity);
|
||||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$amount,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$amount,'chaine',0,'',$conf->entity);
|
||||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$editamount,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$editamount,'chaine',0,'',$conf->entity);
|
||||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$payonline,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$payonline,'chaine',0,'',$conf->entity);
|
||||||
$res=dolibarr_set_const($db, "MEMBER_PAYONLINE_SENDEMAIL",$email,'chaine',0,'',$conf->entity);
|
|
||||||
if ($forcetype < 0) $res=dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE",$conf->entity);
|
if ($forcetype < 0) $res=dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE",$conf->entity);
|
||||||
else $res=dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE",$forcetype,'chaine',0,'',$conf->entity);
|
else $res=dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE",$forcetype,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
@ -211,13 +209,6 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
|||||||
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),0);
|
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),0);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Jump to an online payment page
|
|
||||||
print '<tr class="oddeven" id="tremail"><td>';
|
|
||||||
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
|
|
||||||
print '</td><td align="right">';
|
|
||||||
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<center>';
|
print '<center>';
|
||||||
@ -250,7 +241,6 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
|||||||
print '<a target="_blank" href="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">'.$urlwithroot.'/public/members/new.php'.$entity_qr.'</a>';
|
print '<a target="_blank" href="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">'.$urlwithroot.'/public/members/new.php'.$entity_qr.'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("members");
|
$langs->loadLangs(array("companies","members"));
|
||||||
|
|
||||||
$id = GETPOST('id','int')?GETPOST('id','int'):GETPOST('rowid','int');
|
$id = GETPOST('id','int')?GETPOST('id','int'):GETPOST('rowid','int');
|
||||||
|
|
||||||
@ -175,8 +175,6 @@ if ($object->id > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -28,10 +28,10 @@
|
|||||||
abstract class ActionsAdherentCardCommon
|
abstract class ActionsAdherentCardCommon
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Database handler
|
* @var DoliDB Database handler.
|
||||||
* @var DoliDB
|
|
||||||
*/
|
*/
|
||||||
var $db;
|
public $db;
|
||||||
|
|
||||||
var $dirmodule;
|
var $dirmodule;
|
||||||
var $targetmodule;
|
var $targetmodule;
|
||||||
var $canvas;
|
var $canvas;
|
||||||
@ -41,10 +41,16 @@ abstract class ActionsAdherentCardCommon
|
|||||||
var $tpl = array();
|
var $tpl = array();
|
||||||
//! Object container
|
//! Object container
|
||||||
var $object;
|
var $object;
|
||||||
//! Error string
|
|
||||||
var $error;
|
/**
|
||||||
//! Error array
|
* @var string Error code (or message)
|
||||||
var $errors=array();
|
*/
|
||||||
|
public $error='';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[] Error codes (or messages)
|
||||||
|
*/
|
||||||
|
public $errors = array();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,6 +75,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Set content of ->tpl array, to use into template
|
* Set content of ->tpl array, to use into template
|
||||||
*
|
*
|
||||||
@ -78,6 +85,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
*/
|
*/
|
||||||
function assign_values(&$action, $id)
|
function assign_values(&$action, $id)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf, $langs, $user, $canvas;
|
global $conf, $langs, $user, $canvas;
|
||||||
global $form, $formcompany, $objsoc;
|
global $form, $formcompany, $objsoc;
|
||||||
|
|
||||||
@ -226,6 +234,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Assign POST values into object
|
* Assign POST values into object
|
||||||
*
|
*
|
||||||
@ -233,6 +242,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
*/
|
*/
|
||||||
private function assign_post()
|
private function assign_post()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs, $mysoc;
|
global $langs, $mysoc;
|
||||||
|
|
||||||
$this->object->old_name = $_POST["old_name"];
|
$this->object->old_name = $_POST["old_name"];
|
||||||
@ -271,5 +281,4 @@ abstract class ActionsAdherentCardCommon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,6 +67,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Assign custom values for canvas
|
* Assign custom values for canvas
|
||||||
*
|
*
|
||||||
@ -76,6 +77,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
|||||||
*/
|
*/
|
||||||
function assign_values(&$action, $id)
|
function assign_values(&$action, $id)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $limit, $offset, $sortfield, $sortorder;
|
global $limit, $offset, $sortfield, $sortorder;
|
||||||
global $conf, $db, $langs, $user;
|
global $conf, $db, $langs, $user;
|
||||||
global $form;
|
global $form;
|
||||||
@ -117,10 +119,10 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
|||||||
{
|
{
|
||||||
$this->LoadListDatas($limit, $offset, $sortfield, $sortorder);
|
$this->LoadListDatas($limit, $offset, $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Fetch datas list and save into ->list_datas
|
* Fetch datas list and save into ->list_datas
|
||||||
*
|
*
|
||||||
@ -132,6 +134,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
|||||||
*/
|
*/
|
||||||
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
|
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
//$this->getFieldList();
|
//$this->getFieldList();
|
||||||
@ -139,4 +142,3 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
|||||||
$this->list_datas = array();
|
$this->list_datas = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2012-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -209,7 +210,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessages($object->errors, $object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -980,7 +981,7 @@ else
|
|||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Public profil
|
// Public profil
|
||||||
@ -1218,7 +1219,7 @@ else
|
|||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Public profil
|
// Public profil
|
||||||
@ -1896,6 +1897,6 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -310,6 +310,6 @@ print '<br><input class="button" type="submit" value="'.$langs->trans("BuildDoc"
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -41,71 +41,85 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
|||||||
*/
|
*/
|
||||||
class Adherent extends CommonObject
|
class Adherent extends CommonObject
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string ID to identify managed object
|
||||||
|
*/
|
||||||
public $element='member';
|
public $element='member';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
public $table_element='adherent';
|
public $table_element='adherent';
|
||||||
|
|
||||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
|
||||||
var $mesgs;
|
public $mesgs;
|
||||||
|
|
||||||
var $login;
|
public $login;
|
||||||
|
|
||||||
//! Clear password in memory
|
//! Clear password in memory
|
||||||
var $pass;
|
public $pass;
|
||||||
//! Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
|
//! Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
|
||||||
var $pass_indatabase;
|
public $pass_indatabase;
|
||||||
//! Encrypted password in database (always defined)
|
//! Encrypted password in database (always defined)
|
||||||
var $pass_indatabase_crypted;
|
public $pass_indatabase_crypted;
|
||||||
|
|
||||||
var $societe;
|
public $societe;
|
||||||
var $company;
|
public $company;
|
||||||
var $address;
|
public $address;
|
||||||
var $zip;
|
public $zip;
|
||||||
var $town;
|
public $town;
|
||||||
|
|
||||||
var $state_id; // Id of department
|
public $state_id; // Id of department
|
||||||
var $state_code; // Code of department
|
public $state_code; // Code of department
|
||||||
var $state; // Label of department
|
public $state; // Label of department
|
||||||
|
|
||||||
var $email;
|
public $email;
|
||||||
var $skype;
|
public $skype;
|
||||||
var $phone;
|
public $phone;
|
||||||
var $phone_perso;
|
public $phone_perso;
|
||||||
var $phone_mobile;
|
public $phone_mobile;
|
||||||
|
|
||||||
var $morphy;
|
public $morphy;
|
||||||
var $public;
|
public $public;
|
||||||
var $statut; // -1:brouillon, 0:resilie, >=1:valide,paye
|
public $statut; // -1:brouillon, 0:resilie, >=1:valide,paye
|
||||||
var $photo;
|
public $photo;
|
||||||
|
|
||||||
var $datec;
|
public $datec;
|
||||||
var $datem;
|
public $datem;
|
||||||
var $datefin;
|
public $datefin;
|
||||||
var $datevalid;
|
public $datevalid;
|
||||||
var $birth;
|
public $birth;
|
||||||
|
|
||||||
var $note_public;
|
public $note_public;
|
||||||
var $note_private;
|
public $note_private;
|
||||||
|
|
||||||
var $typeid; // Id type adherent
|
public $typeid; // Id type adherent
|
||||||
var $type; // Libelle type adherent
|
public $type; // Libelle type adherent
|
||||||
var $need_subscription;
|
public $need_subscription;
|
||||||
|
|
||||||
var $user_id;
|
public $user_id;
|
||||||
var $user_login;
|
public $user_login;
|
||||||
|
|
||||||
var $fk_soc;
|
/**
|
||||||
|
* @var int Thirdparty ID
|
||||||
|
*/
|
||||||
|
public $fk_soc;
|
||||||
|
|
||||||
// Fields loaded by fetch_subscriptions()
|
// Fields loaded by fetch_subscriptions()
|
||||||
var $first_subscription_date;
|
public $first_subscription_date;
|
||||||
var $first_subscription_amount;
|
public $first_subscription_amount;
|
||||||
var $last_subscription_date;
|
public $last_subscription_date;
|
||||||
var $last_subscription_date_start;
|
public $last_subscription_date_start;
|
||||||
var $last_subscription_date_end;
|
public $last_subscription_date_end;
|
||||||
var $last_subscription_amount;
|
public $last_subscription_amount;
|
||||||
var $subscriptions=array();
|
public $subscriptions=array();
|
||||||
|
|
||||||
var $oldcopy; // To contains a clone of this when we need to save old properties of object
|
public $oldcopy; // To contains a clone of this when we need to save old properties of object
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Entity
|
||||||
|
*/
|
||||||
public $entity;
|
public $entity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -124,6 +138,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function sending an email has the adherent with the text supplied in parameter.
|
* Function sending an email has the adherent with the text supplied in parameter.
|
||||||
*
|
*
|
||||||
@ -141,6 +156,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='')
|
function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='')
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
// Detect if message is HTML
|
// Detect if message is HTML
|
||||||
@ -464,7 +480,7 @@ class Adherent extends CommonObject
|
|||||||
$action='update';
|
$action='update';
|
||||||
|
|
||||||
// Actions on extra fields
|
// Actions on extra fields
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||||
{
|
{
|
||||||
$result=$this->insertExtraFields();
|
$result=$this->insertExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -531,6 +547,13 @@ class Adherent extends CommonObject
|
|||||||
$luser->pass=$this->pass;
|
$luser->pass=$this->pass;
|
||||||
$luser->societe_id=$this->societe;
|
$luser->societe_id=$this->societe;
|
||||||
|
|
||||||
|
$luser->birth=$this->birth;
|
||||||
|
$luser->address=$this->address;
|
||||||
|
$luser->zip=$this->zip;
|
||||||
|
$luser->town=$this->town;
|
||||||
|
$luser->country_id=$this->country_id;
|
||||||
|
$luser->state_id=$this->state_id;
|
||||||
|
|
||||||
$luser->email=$this->email;
|
$luser->email=$this->email;
|
||||||
$luser->skype=$this->skype;
|
$luser->skype=$this->skype;
|
||||||
$luser->office_phone=$this->phone;
|
$luser->office_phone=$this->phone;
|
||||||
@ -622,6 +645,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Update denormalized last subscription date.
|
* Update denormalized last subscription date.
|
||||||
* This function is called when we delete a subscription for example.
|
* This function is called when we delete a subscription for example.
|
||||||
@ -631,6 +655,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function update_end_date($user)
|
function update_end_date($user)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Search for last subscription id and end date
|
// Search for last subscription id and end date
|
||||||
@ -675,7 +700,6 @@ class Adherent extends CommonObject
|
|||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -977,6 +1001,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Method to load member from its login
|
* Method to load member from its login
|
||||||
*
|
*
|
||||||
@ -985,6 +1010,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch_login($login)
|
function fetch_login($login)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
|
||||||
@ -1006,6 +1032,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Method to load member from its name
|
* Method to load member from its name
|
||||||
*
|
*
|
||||||
@ -1015,6 +1042,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch_name($firstname,$lastname)
|
function fetch_name($firstname,$lastname)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
|
||||||
@ -1177,6 +1205,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Fonction qui recupere pour un adherent les parametres
|
* Fonction qui recupere pour un adherent les parametres
|
||||||
* first_subscription_date
|
* first_subscription_date
|
||||||
@ -1188,6 +1217,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch_subscriptions()
|
function fetch_subscriptions()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||||
@ -1340,7 +1370,7 @@ class Adherent extends CommonObject
|
|||||||
* @param string $num_chq Numero cheque (if Id bank account provided)
|
* @param string $num_chq Numero cheque (if Id bank account provided)
|
||||||
* @param string $emetteur_nom Name of cheque writer
|
* @param string $emetteur_nom Name of cheque writer
|
||||||
* @param string $emetteur_banque Name of bank of cheque
|
* @param string $emetteur_banque Name of bank of cheque
|
||||||
* @param string $autocreatethirdparty Auto create new thirdparty if member not linked to a thirdparty and we request an option that generate invoice.
|
* @param string $autocreatethirdparty Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice.
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom='', $emetteur_banque='', $autocreatethirdparty=0)
|
function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom='', $emetteur_banque='', $autocreatethirdparty=0)
|
||||||
@ -1731,6 +1761,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function to add member into external tools mailing-list, spip, etc.
|
* Function to add member into external tools mailing-list, spip, etc.
|
||||||
*
|
*
|
||||||
@ -1738,6 +1769,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function add_to_abo()
|
function add_to_abo()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
||||||
@ -1788,6 +1820,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function to delete a member from external tools like mailing-list, spip, etc.
|
* Function to delete a member from external tools like mailing-list, spip, etc.
|
||||||
*
|
*
|
||||||
@ -1795,6 +1828,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function del_to_abo()
|
function del_to_abo()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
||||||
@ -1967,6 +2001,7 @@ class Adherent extends CommonObject
|
|||||||
return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode);
|
return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoi le libelle d'un statut donne
|
* Renvoi le libelle d'un statut donne
|
||||||
*
|
*
|
||||||
@ -1978,6 +2013,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
|
function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
@ -1991,7 +2027,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($statut == 0) return $langs->trans("MemberStatusResiliated");
|
if ($statut == 0) return $langs->trans("MemberStatusResiliated");
|
||||||
}
|
}
|
||||||
if ($mode == 1)
|
elseif ($mode == 1)
|
||||||
{
|
{
|
||||||
if ($statut == -1) return $langs->trans("MemberStatusDraftShort");
|
if ($statut == -1) return $langs->trans("MemberStatusDraftShort");
|
||||||
if ($statut >= 1)
|
if ($statut >= 1)
|
||||||
@ -2002,7 +2038,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($statut == 0) return $langs->trans("MemberStatusResiliatedShort");
|
if ($statut == 0) return $langs->trans("MemberStatusResiliatedShort");
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
elseif ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraftShort");
|
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraftShort");
|
||||||
if ($statut >= 1)
|
if ($statut >= 1)
|
||||||
@ -2013,7 +2049,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliatedShort");
|
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliatedShort");
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
elseif ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
||||||
if ($statut >= 1)
|
if ($statut >= 1)
|
||||||
@ -2024,7 +2060,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5');
|
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
elseif ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraft");
|
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraft");
|
||||||
if ($statut >= 1)
|
if ($statut >= 1)
|
||||||
@ -2035,7 +2071,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliated");
|
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliated");
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
elseif ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
||||||
if ($statut >= 1)
|
if ($statut >= 1)
|
||||||
@ -2046,7 +2082,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($statut == 0) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusResiliated").' </span>'.img_picto($langs->trans('MemberStatusResiliated'),'statut5');
|
if ($statut == 0) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusResiliated").' </span>'.img_picto($langs->trans('MemberStatusResiliated'),'statut5');
|
||||||
}
|
}
|
||||||
if ($mode == 6)
|
elseif ($mode == 6)
|
||||||
{
|
{
|
||||||
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
||||||
if ($statut >= 1)
|
if ($statut >= 1)
|
||||||
@ -2060,6 +2096,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Charge indicateurs this->nb de tableau de bord
|
* Charge indicateurs this->nb de tableau de bord
|
||||||
*
|
*
|
||||||
@ -2067,6 +2104,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function load_state_board()
|
function load_state_board()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->nb=array();
|
$this->nb=array();
|
||||||
@ -2092,9 +2130,9 @@ class Adherent extends CommonObject
|
|||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||||
*
|
*
|
||||||
@ -2103,6 +2141,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function load_board($user)
|
function load_board($user)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe
|
if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe
|
||||||
@ -2237,6 +2276,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
||||||
*
|
*
|
||||||
@ -2248,6 +2288,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function _load_ldap_dn($info,$mode=0)
|
function _load_ldap_dn($info,$mode=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
$dn='';
|
$dn='';
|
||||||
if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS."=".$info[$conf->global->LDAP_KEY_MEMBERS].",".$conf->global->LDAP_MEMBER_DN;
|
if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS."=".$info[$conf->global->LDAP_KEY_MEMBERS].",".$conf->global->LDAP_MEMBER_DN;
|
||||||
@ -2257,6 +2298,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Initialise tableau info (tableau des attributs LDAP)
|
* Initialise tableau info (tableau des attributs LDAP)
|
||||||
*
|
*
|
||||||
@ -2264,6 +2306,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function _load_ldap_info()
|
function _load_ldap_info()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$info=array();
|
$info=array();
|
||||||
@ -2454,6 +2497,7 @@ class Adherent extends CommonObject
|
|||||||
* Existing categories are left untouch.
|
* Existing categories are left untouch.
|
||||||
*
|
*
|
||||||
* @param int[]|int $categories Category or categories IDs
|
* @param int[]|int $categories Category or categories IDs
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setCategories($categories)
|
public function setCategories($categories)
|
||||||
{
|
{
|
||||||
@ -2592,6 +2636,7 @@ class Adherent extends CommonObject
|
|||||||
$outputlangs = new Translate('', $conf);
|
$outputlangs = new Translate('', $conf);
|
||||||
$outputlangs->setDefaultLang(empty($adherent->thirdparty->default_lang) ? $mysoc->default_lang : $adherent->thirdparty->default_lang);
|
$outputlangs->setDefaultLang(empty($adherent->thirdparty->default_lang) ? $mysoc->default_lang : $adherent->thirdparty->default_lang);
|
||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members"));
|
||||||
|
dol_syslog("sendReminderForExpiredSubscription Language set to ".$outputlangs->defaultlang);
|
||||||
|
|
||||||
$arraydefaultmessage=null;
|
$arraydefaultmessage=null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION;
|
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION;
|
||||||
@ -2655,5 +2700,4 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,9 +32,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
|||||||
*/
|
*/
|
||||||
class AdherentType extends CommonObject
|
class AdherentType extends CommonObject
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
public $table_element = 'adherent_type';
|
public $table_element = 'adherent_type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string ID to identify managed object
|
||||||
|
*/
|
||||||
public $element = 'adherent_type';
|
public $element = 'adherent_type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
|
*/
|
||||||
public $picto = 'group';
|
public $picto = 'group';
|
||||||
|
|
||||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,19 +55,25 @@ class AdherentType extends CommonObject
|
|||||||
* @see label
|
* @see label
|
||||||
*/
|
*/
|
||||||
public $libelle;
|
public $libelle;
|
||||||
|
|
||||||
/** @var string Label */
|
/** @var string Label */
|
||||||
public $label;
|
public $label;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Subsription required (0 or 1)
|
* @var int Subsription required (0 or 1)
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
public $subscription;
|
public $subscription;
|
||||||
|
|
||||||
/** @var string Public note */
|
/** @var string Public note */
|
||||||
public $note;
|
public $note;
|
||||||
|
|
||||||
/** @var integer Can vote */
|
/** @var integer Can vote */
|
||||||
public $vote;
|
public $vote;
|
||||||
|
|
||||||
/** @var string Email sent during validation */
|
/** @var string Email sent during validation */
|
||||||
public $mail_valid;
|
public $mail_valid;
|
||||||
|
|
||||||
/** @var array Array of members */
|
/** @var array Array of members */
|
||||||
public $members=array();
|
public $members=array();
|
||||||
|
|
||||||
@ -172,7 +190,7 @@ class AdherentType extends CommonObject
|
|||||||
$action='update';
|
$action='update';
|
||||||
|
|
||||||
// Actions on extra fields
|
// Actions on extra fields
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||||
{
|
{
|
||||||
$result=$this->insertExtraFields();
|
$result=$this->insertExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -282,6 +300,7 @@ class AdherentType extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of members' type
|
* Return list of members' type
|
||||||
*
|
*
|
||||||
@ -289,6 +308,7 @@ class AdherentType extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function liste_array()
|
function liste_array()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$adherenttypes = array();
|
$adherenttypes = array();
|
||||||
@ -413,6 +433,7 @@ class AdherentType extends CommonObject
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
||||||
*
|
*
|
||||||
@ -424,6 +445,7 @@ class AdherentType extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function _load_ldap_dn($info,$mode=0)
|
function _load_ldap_dn($info,$mode=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
$dn='';
|
$dn='';
|
||||||
if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS_TYPES."=".$info[$conf->global->LDAP_KEY_MEMBERS_TYPES].",".$conf->global->LDAP_MEMBER_TYPE_DN;
|
if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS_TYPES."=".$info[$conf->global->LDAP_KEY_MEMBERS_TYPES].",".$conf->global->LDAP_MEMBER_TYPE_DN;
|
||||||
@ -433,6 +455,7 @@ class AdherentType extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Initialize the info array (array of LDAP values) that will be used to call LDAP functions
|
* Initialize the info array (array of LDAP values) that will be used to call LDAP functions
|
||||||
*
|
*
|
||||||
@ -440,6 +463,7 @@ class AdherentType extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function _load_ldap_info()
|
function _load_ldap_info()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$info=array();
|
$info=array();
|
||||||
@ -547,5 +571,4 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,9 @@ include_once DOL_DOCUMENT_ROOT . '/adherents/class/subscription.class.php';
|
|||||||
*/
|
*/
|
||||||
class AdherentStats extends Stats
|
class AdherentStats extends Stats
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
public $table_element;
|
public $table_element;
|
||||||
|
|
||||||
var $socid;
|
var $socid;
|
||||||
@ -178,5 +181,4 @@ class AdherentStats extends Stats
|
|||||||
|
|
||||||
return $this->_getAllByYear($sql);
|
return $this->_getAllByYear($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,7 +91,8 @@ class Members extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $typeid = '', $sqlfilters = '') {
|
function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $typeid = '', $sqlfilters = '')
|
||||||
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
@ -293,7 +294,8 @@ class Members extends DolibarrApi
|
|||||||
* @param object $object Object to clean
|
* @param object $object Object to clean
|
||||||
* @return array Array of cleaned object properties
|
* @return array Array of cleaned object properties
|
||||||
*/
|
*/
|
||||||
function _cleanObjectDatas($object) {
|
function _cleanObjectDatas($object)
|
||||||
|
{
|
||||||
|
|
||||||
$object = parent::_cleanObjectDatas($object);
|
$object = parent::_cleanObjectDatas($object);
|
||||||
|
|
||||||
@ -407,5 +409,4 @@ class Members extends DolibarrApi
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class MembersTypes extends DolibarrApi
|
|||||||
* @var array $FIELDS Mandatory fields, checked when create and update object
|
* @var array $FIELDS Mandatory fields, checked when create and update object
|
||||||
*/
|
*/
|
||||||
static $FIELDS = array(
|
static $FIELDS = array(
|
||||||
'label'
|
'label',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +86,8 @@ class MembersTypes extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '') {
|
function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '')
|
||||||
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
@ -271,7 +272,8 @@ class MembersTypes extends DolibarrApi
|
|||||||
* @param object $object Object to clean
|
* @param object $object Object to clean
|
||||||
* @return array Array of cleaned object properties
|
* @return array Array of cleaned object properties
|
||||||
*/
|
*/
|
||||||
function _cleanObjectDatas($object) {
|
function _cleanObjectDatas($object)
|
||||||
|
{
|
||||||
|
|
||||||
$object = parent::_cleanObjectDatas($object);
|
$object = parent::_cleanObjectDatas($object);
|
||||||
|
|
||||||
@ -318,5 +320,4 @@ class MembersTypes extends DolibarrApi
|
|||||||
|
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class Subscriptions extends DolibarrApi
|
|||||||
'fk_adherent',
|
'fk_adherent',
|
||||||
'dateh',
|
'dateh',
|
||||||
'datef',
|
'datef',
|
||||||
'amount'
|
'amount',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,7 +85,8 @@ class Subscriptions extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function index($sortfield = "dateadh", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '') {
|
function index($sortfield = "dateadh", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '')
|
||||||
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
|
|||||||
@ -32,17 +32,28 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
|||||||
*/
|
*/
|
||||||
class Subscription extends CommonObject
|
class Subscription extends CommonObject
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string ID to identify managed object
|
||||||
|
*/
|
||||||
public $element='subscription';
|
public $element='subscription';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
public $table_element='subscription';
|
public $table_element='subscription';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
|
*/
|
||||||
public $picto='payment';
|
public $picto='payment';
|
||||||
|
|
||||||
var $datec; // Date creation
|
public $datec; // Date creation
|
||||||
var $datem; // Date modification
|
public $datem; // Date modification
|
||||||
var $dateh; // Subscription start date (date subscription)
|
public $dateh; // Subscription start date (date subscription)
|
||||||
var $datef; // Subscription end date
|
public $datef; // Subscription end date
|
||||||
var $fk_adherent;
|
public $fk_adherent;
|
||||||
var $amount;
|
public $amount;
|
||||||
var $fk_bank;
|
public $fk_bank;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -355,6 +366,7 @@ class Subscription extends CommonObject
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoi le libelle d'un statut donne
|
* Renvoi le libelle d'un statut donne
|
||||||
*
|
*
|
||||||
@ -363,6 +375,7 @@ class Subscription extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function LibStatut($statut)
|
function LibStatut($statut)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
@ -33,9 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
|
|
||||||
$langs->load("members");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("companies","members","other"));
|
||||||
$langs->load('other');
|
|
||||||
|
|
||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
@ -91,7 +91,7 @@ if ($id > 0)
|
|||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
@ -170,6 +170,6 @@ else
|
|||||||
print $langs->trans("ErrorRecordNotFound");
|
print $langs->trans("ErrorRecordNotFound");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -86,7 +86,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("members");
|
$langs->loadLangs(array("companies","members"));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$result=restrictedArea($user,'adherent');
|
$result=restrictedArea($user,'adherent');
|
||||||
@ -435,6 +435,6 @@ print "</div>";
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -29,10 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("members");
|
$langs->loadLangs(array("companies","members","ldap","admin"));
|
||||||
$langs->load("ldap");
|
|
||||||
$langs->load("admin");
|
|
||||||
|
|
||||||
$rowid = GETPOST('id','int');
|
$rowid = GETPOST('id','int');
|
||||||
$action = GETPOST('action','aZ09');
|
$action = GETPOST('action','aZ09');
|
||||||
@ -75,7 +73,7 @@ if ($action == 'dolibarr2ldap')
|
|||||||
setEventMessages($langs->trans("MemberSynchronized"), null, 'mesgs');
|
setEventMessages($langs->trans("MemberSynchronized"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setEventMessages($ldap->errors, $ldap->error, 'errors');
|
setEventMessages($ldap->error, $ldap->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,5 +219,6 @@ else
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -48,6 +48,7 @@ $search=GETPOST("search",'alpha');
|
|||||||
$search_ref=GETPOST("search_ref",'alpha');
|
$search_ref=GETPOST("search_ref",'alpha');
|
||||||
$search_lastname=GETPOST("search_lastname",'alpha');
|
$search_lastname=GETPOST("search_lastname",'alpha');
|
||||||
$search_firstname=GETPOST("search_firstname",'alpha');
|
$search_firstname=GETPOST("search_firstname",'alpha');
|
||||||
|
$search_civility=GETPOST("search_civility",'alpha');
|
||||||
$search_login=GETPOST("search_login",'alpha');
|
$search_login=GETPOST("search_login",'alpha');
|
||||||
$search_address=GETPOST("search_address",'alpha');
|
$search_address=GETPOST("search_address",'alpha');
|
||||||
$search_zip=GETPOST("search_zip",'alpha');
|
$search_zip=GETPOST("search_zip",'alpha');
|
||||||
@ -105,6 +106,7 @@ $fieldstosearchall = array(
|
|||||||
if($db->type == 'pgsql') unset($fieldstosearchall['d.rowid']);
|
if($db->type == 'pgsql') unset($fieldstosearchall['d.rowid']);
|
||||||
$arrayfields=array(
|
$arrayfields=array(
|
||||||
'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||||
|
'd.civility'=>array('label'=>$langs->trans("Civility"), 'checked'=>0),
|
||||||
'd.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
|
'd.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
|
||||||
'd.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1),
|
'd.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1),
|
||||||
'd.company'=>array('label'=>$langs->trans("Company"), 'checked'=>1),
|
'd.company'=>array('label'=>$langs->trans("Company"), 'checked'=>1),
|
||||||
@ -160,6 +162,7 @@ if (empty($reshook))
|
|||||||
$search_ref="";
|
$search_ref="";
|
||||||
$search_lastname="";
|
$search_lastname="";
|
||||||
$search_firstname="";
|
$search_firstname="";
|
||||||
|
$search_civility="";
|
||||||
$search_login="";
|
$search_login="";
|
||||||
$search_company="";
|
$search_company="";
|
||||||
$search_type="";
|
$search_type="";
|
||||||
@ -203,7 +206,7 @@ $memberstatic=new Adherent($db);
|
|||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
|
$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
|
||||||
$sql.= " d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
|
$sql.= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
|
||||||
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,";
|
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,";
|
||||||
$sql.= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
|
$sql.= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
|
||||||
$sql.= " t.libelle as type, t.subscription,";
|
$sql.= " t.libelle as type, t.subscription,";
|
||||||
@ -234,6 +237,7 @@ if ($search_ref)
|
|||||||
if (is_numeric($search_ref)) $sql.= " AND (d.rowid = ".$db->escape($search_ref).")";
|
if (is_numeric($search_ref)) $sql.= " AND (d.rowid = ".$db->escape($search_ref).")";
|
||||||
else $sql.=" AND 1 = 2"; // Always wrong
|
else $sql.=" AND 1 = 2"; // Always wrong
|
||||||
}
|
}
|
||||||
|
if ($search_civility) $sql.= natural_search("d.civility", $search_civility);
|
||||||
if ($search_firstname) $sql.= natural_search("d.firstname", $search_firstname);
|
if ($search_firstname) $sql.= natural_search("d.firstname", $search_firstname);
|
||||||
if ($search_lastname) $sql.= natural_search(array("d.firstname", "d.lastname", "d.societe"), $search_lastname);
|
if ($search_lastname) $sql.= natural_search(array("d.firstname", "d.lastname", "d.societe"), $search_lastname);
|
||||||
if ($search_login) $sql.= natural_search("d.login", $search_login);
|
if ($search_login) $sql.= natural_search("d.login", $search_login);
|
||||||
@ -322,6 +326,7 @@ if ($sall != "") $param.="&sall=".urlencode($sall);
|
|||||||
if ($statut != "") $param.="&statut=".urlencode($statut);
|
if ($statut != "") $param.="&statut=".urlencode($statut);
|
||||||
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
|
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
|
||||||
if ($search_nom) $param.="&search_nom=".urlencode($search_nom);
|
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_firstname) $param.="&search_firstname=".urlencode($search_firstname);
|
||||||
if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname);
|
if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname);
|
||||||
if ($search_login) $param.="&search_login=".urlencode($search_login);
|
if ($search_login) $param.="&search_login=".urlencode($search_login);
|
||||||
@ -427,37 +432,36 @@ if (! empty($arrayfields['d.ref']['checked']))
|
|||||||
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
if (! empty($arrayfields['d.civility']['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print '<input class="flat maxwidth25" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).'"></td>';
|
||||||
|
}
|
||||||
if (! empty($arrayfields['d.firstname']['checked']))
|
if (! empty($arrayfields['d.firstname']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat maxwidth50" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'"></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['d.lastname']['checked']))
|
if (! empty($arrayfields['d.lastname']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat maxwidth50" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['d.company']['checked']))
|
if (! empty($arrayfields['d.company']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat maxwidth50" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['d.login']['checked']))
|
if (! empty($arrayfields['d.login']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat maxwidth50" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'"></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['d.morphy']['checked']))
|
if (! empty($arrayfields['d.morphy']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['t.libelle']['checked']))
|
if (! empty($arrayfields['t.libelle']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
@ -568,6 +572,7 @@ print "</tr>\n";
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) print_liste_field_titre("ID",$_SERVER["PHP_SELF"],'','',$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) print_liste_field_titre("ID",$_SERVER["PHP_SELF"],'','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'],$_SERVER["PHP_SELF"],'d.rowid','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'],$_SERVER["PHP_SELF"],'d.rowid','',$param,'',$sortfield,$sortorder);
|
||||||
|
if (! empty($arrayfields['d.civility']['checked'])) print_liste_field_titre($arrayfields['d.civility']['label'],$_SERVER["PHP_SELF"],'d.civility','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.firstname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.firstname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.lastname']['checked'])) print_liste_field_titre($arrayfields['d.lastname']['label'],$_SERVER["PHP_SELF"],'d.lastname','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.lastname']['checked'])) print_liste_field_titre($arrayfields['d.lastname']['label'],$_SERVER["PHP_SELF"],'d.lastname','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.company']['checked'])) print_liste_field_titre($arrayfields['d.company']['label'],$_SERVER["PHP_SELF"],'d.societe','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.company']['checked'])) print_liste_field_titre($arrayfields['d.company']['label'],$_SERVER["PHP_SELF"],'d.societe','',$param,'',$sortfield,$sortorder);
|
||||||
@ -605,6 +610,7 @@ while ($i < min($num, $limit))
|
|||||||
$datefin=$db->jdate($obj->datefin);
|
$datefin=$db->jdate($obj->datefin);
|
||||||
$memberstatic->id=$obj->rowid;
|
$memberstatic->id=$obj->rowid;
|
||||||
$memberstatic->ref=$obj->rowid;
|
$memberstatic->ref=$obj->rowid;
|
||||||
|
$memberstatic->civility_id=$obj->civility;
|
||||||
$memberstatic->lastname=$obj->lastname;
|
$memberstatic->lastname=$obj->lastname;
|
||||||
$memberstatic->firstname=$obj->firstname;
|
$memberstatic->firstname=$obj->firstname;
|
||||||
$memberstatic->statut=$obj->statut;
|
$memberstatic->statut=$obj->statut;
|
||||||
@ -634,6 +640,13 @@ while ($i < min($num, $limit))
|
|||||||
print $memberstatic->getNomUrl(-1, 0, 'card', 'ref');
|
print $memberstatic->getNomUrl(-1, 0, 'card', 'ref');
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
}
|
}
|
||||||
|
// Civility
|
||||||
|
if (! empty($arrayfields['d.civility']['checked']))
|
||||||
|
{
|
||||||
|
print "<td>";
|
||||||
|
print $obj->civility;
|
||||||
|
print "</td>\n";
|
||||||
|
}
|
||||||
// Firstname
|
// Firstname
|
||||||
if (! empty($arrayfields['d.firstname']['checked']))
|
if (! empty($arrayfields['d.firstname']['checked']))
|
||||||
{
|
{
|
||||||
@ -827,6 +840,6 @@ print '</form>';
|
|||||||
|
|
||||||
if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1);
|
if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1);
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("members");
|
$langs->loadLangs(array("companies","members","bills"));
|
||||||
$langs->load("bills");
|
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
@ -120,6 +119,6 @@ if ($id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -44,8 +44,8 @@ $year = strftime("%Y", time());
|
|||||||
$startyear=$year-2;
|
$startyear=$year-2;
|
||||||
$endyear=$year;
|
$endyear=$year;
|
||||||
|
|
||||||
$langs->load("members");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("companies","members"));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -143,7 +143,6 @@ print '</table>';
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user