Merge branch 'develop' into dev_NEW_copyeventfiles
Conflicts: htdocs/core/actions_sendmails.inc.php
This commit is contained in:
commit
00ead9d262
@ -12,6 +12,7 @@ php:
|
|||||||
- '5.5'
|
- '5.5'
|
||||||
- '5.6'
|
- '5.6'
|
||||||
- '7.0'
|
- '7.0'
|
||||||
|
- '7.1'
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
@ -50,6 +51,7 @@ env:
|
|||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
|
- php: 7.1
|
||||||
- php: nightly
|
- php: nightly
|
||||||
# FIXME
|
# FIXME
|
||||||
#- env: DB=postgresql
|
#- env: DB=postgresql
|
||||||
@ -96,7 +98,7 @@ install:
|
|||||||
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
|
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
|
||||||
composer -n require phpunit/phpunit ^4
|
composer -n require phpunit/phpunit ^4
|
||||||
fi
|
fi
|
||||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||||
composer -n require phpunit/phpunit ^5
|
composer -n require phpunit/phpunit ^5
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
@ -136,7 +138,7 @@ before_script:
|
|||||||
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||||
echo
|
echo
|
||||||
echo "Enabling Memcached for PHP <= 5.4"
|
echo "Enabling Memcached for PHP <= 5.4"
|
||||||
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly!
|
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1 and nightly!
|
||||||
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||||
fi
|
fi
|
||||||
phpenv rehash
|
phpenv rehash
|
||||||
@ -208,7 +210,7 @@ before_script:
|
|||||||
echo "Setting up Apache + FPM"
|
echo "Setting up Apache + FPM"
|
||||||
# enable php-fpm
|
# enable php-fpm
|
||||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
|
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
|
||||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||||
# Copy the included pool
|
# Copy the included pool
|
||||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf
|
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf
|
||||||
fi
|
fi
|
||||||
|
|||||||
300
ChangeLog
300
ChangeLog
@ -2,20 +2,130 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
WARNING:
|
|
||||||
|
|
||||||
Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40.
|
|
||||||
Mysql version 5.5.40 has a very critical bug making your data beeing definitely lost.
|
|
||||||
You may also experience troubles with Mysql 5.5.41/42/43 with error "Lost connection" during
|
|
||||||
migration.
|
|
||||||
Upgrading to any other version or any other database system is abolutely required BEFORE trying
|
|
||||||
make a Dolibarr upgrade.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 5.0.0 compared to 4.0.* *****
|
***** ChangeLog for 5.0.0 compared to 4.0.* *****
|
||||||
For users:
|
For users:
|
||||||
...
|
NEW: Add module mulicurrency.
|
||||||
|
NEW: Add module accoutancy expert (double party accountancy).
|
||||||
|
NEW: Better responsive design, above all on smartphone.
|
||||||
|
NEW: #5801 More complete change to allow to disable supplier invoice document generation.
|
||||||
|
NEW: #5830 Can choose a generic email or use remail in the mail from field.
|
||||||
|
NEW: #5896 More complete data on event sent by email (name in title, emails list in details)
|
||||||
|
NEW: Add a better icon to show when "run" in cron jobs is disabled.
|
||||||
|
NEW: Add account statement into fields of bank account transaction list.
|
||||||
|
NEW: Add a direct debit mandate PDF template.
|
||||||
|
NEW: add clone contract feature.
|
||||||
|
NEW: Add color regarding stock even on ajax autocompleter product selector.
|
||||||
|
NEW: Add date into list of print jobs for Google Print.
|
||||||
|
NEW: add field and filters on turnover by third party report.
|
||||||
|
NEW: Add last activation date as info in module list.
|
||||||
|
NEW: add option to limit stock product by warehouse.
|
||||||
|
NEW: Add missing unique key on table llx_links.
|
||||||
|
NEW: Add option "Hide images in Top menu".
|
||||||
|
NEW: Add option PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY to show thirdparty on page to submit time.
|
||||||
|
NEW: Add option "Stock can be negative". Off by default.
|
||||||
|
NEW: Add option SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED.
|
||||||
|
NEW: Add hidden option to include parent products too in stats of orders (not supported in rest of app yet).
|
||||||
|
NEW: Add Panama datas.
|
||||||
|
NEW: Add ressource extrafields.
|
||||||
|
NEW: add restrictions on standard exports (agenda, order, deplacement, facture, fournisseur, societe, propal, expedition)
|
||||||
|
NEW: Add substitution keys __SHIPPINGTRACKNUM__, __SHIPPINGTRACKNUMURL__ into shipping email template.
|
||||||
|
NEW: Add status Done on interventions.
|
||||||
|
NEW: Add system tool "Files integrity checker" to detect modified files for packaged versions.
|
||||||
|
NEW: Add tooltip in payment term edition in dictionnary.
|
||||||
|
NEW: Add type "url" as possible extrafield.
|
||||||
|
NEW: Add workflow to calculated supplier order status on stock dispatch.
|
||||||
|
NEW: Add workflow to classifed propal bill on invoice validation.
|
||||||
|
NEW: allow to save a parent warehouse.
|
||||||
|
NEW: Better filtering of automatic/manually inserted events.
|
||||||
|
NEW: Bill orders from order list.
|
||||||
|
NEW: Can add event from the card listing events.
|
||||||
|
NEW: Can change thirdparty when cloning a project.
|
||||||
|
NEW: Can create expense report for someone else (advanced permission).
|
||||||
|
NEW: Can clone an expense report.
|
||||||
|
NEW: Can edit a label for each price segment when using several segment prices for products.
|
||||||
|
NEW: Can filter on fields on admin translation page.
|
||||||
|
NEW: Can filter on project/task ref/label on the "new time consumed" page.
|
||||||
|
NEW: Can filter on status on objects on the "statistics" pages.
|
||||||
|
NEW: Can filter on type of leave requests in list.
|
||||||
|
NEW: Can generate SEPA mandate for each bank account of your customers.
|
||||||
|
NEW: Can see/make bank conciliation from bank transaction list.
|
||||||
|
NEW: Can edit RUM number of a customer bank account.
|
||||||
|
NEW: Can link template invoice to other objects. Generated invoices will be linked to same objects (example: contracts).
|
||||||
|
NEW: Can renamed attached files on some documents tabs (like products and expense reports).
|
||||||
|
NEW: Can see/edit the customer ref of a shipment.
|
||||||
|
NEW: Can select fields/extrafields on contract list + Mass delete action.
|
||||||
|
NEW: Can select fields on expense report list. Can make mass delete.
|
||||||
|
NEW: Can select fields to show on list of bank transaction.
|
||||||
|
NEW: Can set to paid automatically social or fiscal taxes after a payment was recorded.
|
||||||
|
NEW: Can sort on status of recurring invoice in list of template invoices.
|
||||||
|
NEW: Can use native php and dolibarr object on pages of module website.
|
||||||
|
NEW: Checkbox 'close order to "Everything received" automatically if all products are received' is visible on supplier orders.
|
||||||
|
NEW: conf to allow payments on different thirdparties bills but same parent company.
|
||||||
|
NEW: Consumption view on thirdparty total line and total HT by element.
|
||||||
|
NEW: Display bookkeeping by accounting account - Bookkeeping ordered by accounting account - Link with customers and suppliers invoices - Sub Total by accounting account - Ability to display more than 25 lines and filter by customer/supplier, invoice and accounting account
|
||||||
|
NEW: Each user can select its landing page (on tab "user display setup").
|
||||||
|
NEW: Editing translation GUI become easier with tool to search existing translation.
|
||||||
|
NEW: Error code of each email sent is visible in list of email targets
|
||||||
|
NEW: Export thirdparty with payment terms and mode.
|
||||||
|
NEW: filter actiontype on thirdparty tab.
|
||||||
|
NEW: filter by supplier and fk_warehouse on replenishment page.
|
||||||
|
NEW: Filters can accept generic search key like __DAY__, __MONTH__, __YEAR__ replaced with current day, month year before making the search.
|
||||||
|
NEW: Function "crop" images available on project, product and holiday attachment tab.
|
||||||
|
NEW: function to display full path to current warehouse.
|
||||||
|
NEW: Generation of document is available on member card.
|
||||||
|
NEW: Introduce mass action "delete" on sales orders.
|
||||||
|
NEW: Introduce option MAIN_DEFAULT_PAYMENT_TERM_ID to set default payment term on company level.
|
||||||
|
NEW: introduce option PROJECT_DISABLE_PRIVATE_PROJECT and PROJECT_DISABLE_PUBLIC_PROJECT.
|
||||||
|
NEW: Link between objects can be done on both side and on all objects.
|
||||||
|
NEW: More filter on bank transaction list.
|
||||||
|
NEW: Mutualize mass action. So "Send by email" is also available on orders.
|
||||||
|
NEW: New set of icon for status easier to understand.
|
||||||
|
NEW: option "Current/Next" for limit payment date (in payment term dictionary setup) to use a specific day of current month or jump to same day of next month.
|
||||||
|
NEW: Option DOC_SHOW_FIRST_SALES_REP shows name of "user buyer or saler" on PDF.
|
||||||
|
NEW: Option MAIN_INFO_SOCIETE_MAIL_ALIASES to be able to use several identities into the "email from".
|
||||||
|
NEW: Pagination available on list of users.
|
||||||
|
NEW: Phone formatting for Canada. Add dol_print_phone into phpunit tests.
|
||||||
|
NEW: Reduce nb of picto visible after reference of an object into lists, merging preview and download.
|
||||||
|
NEW: Reduce space lost on EDM module.
|
||||||
|
NEW: Reopen a paid bill is a user advanced permission.
|
||||||
|
NEW: can set a default bank account on thirdparty card.
|
||||||
|
NEW: Show photo of contacts on thirdparty card.
|
||||||
|
NEW: Show subtotal into list of linked elements.
|
||||||
|
NEW: Show total line (planned workload and time spent) on list of tasks.
|
||||||
|
NEW: Start to introduce search filters on dictionnaries for vat list.
|
||||||
|
NEW: Support extrafields for expense reports.
|
||||||
|
NEW: Support extrafields on product lot.
|
||||||
|
NEW: Support free bottom text and watermark on expense report template.
|
||||||
|
NEW: Support mass actions for proposals
|
||||||
|
NEW: Table with list of lots/serial can be viewed (module product batch).
|
||||||
|
NEW: The autofill zip/town table option is on by default.
|
||||||
|
NEW: the count of linked files on card includes external links.
|
||||||
|
NEW: Usage of vat code seems ok everywhere.
|
||||||
|
NEW: User date of employment added.
|
||||||
|
NEW: Use small photo of user on all user links.
|
||||||
|
NEW: Use new archi to select fields into list of time spent.
|
||||||
|
NEW: Available substitution key (__INVOICE_MONTH__, __INVOICE_PREVIOUS_MONTH__, ...) to use into note text of recurring invoices.
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
NEW: Add ORDER_MODIFY trigger on each order modification.
|
||||||
|
NEW: Trigger on delete stock
|
||||||
|
NEW: The getURLContent return more information on success and error.
|
||||||
|
NEW: Uniformize code and correct deal with triggers
|
||||||
|
NEW: REST API explorer. Can create invoice and orders with lines.
|
||||||
|
NEW: Add a lot of API REST: expense reports, orders, commercial proposals, projects, agenda events, users, invoices, ...
|
||||||
|
NEW: Default collation for mysql is now utf8_unicode_ci
|
||||||
|
NEW: Can use any filter on all REST API to list.
|
||||||
|
NEW: ckeditor accept a parameter to disable all html filtering.
|
||||||
|
NEW: Complete table llx_ecm_files with field generated_or_uploaded
|
||||||
|
NEW: Enhance function setValueFrom so we can use it for "edit in form" feature.
|
||||||
|
NEW: getNomUrl displays full path to warehouse
|
||||||
|
NEW: Hook formObjectOptions
|
||||||
|
NEW: hook in element overview
|
||||||
|
NEW: Hook on stock product card
|
||||||
|
NEW: param socid find_min_price_product_fournisseur() function
|
||||||
|
NEW: More phpunit tests
|
||||||
|
|
||||||
WARNING:
|
WARNING:
|
||||||
|
|
||||||
@ -39,8 +149,57 @@ Dolibarr better:
|
|||||||
- Trigger name SUPPLIER_PROPOSAL_CREATE has been renamed into PROPOSAL_SUPPLIER_CREATE.
|
- Trigger name SUPPLIER_PROPOSAL_CREATE has been renamed into PROPOSAL_SUPPLIER_CREATE.
|
||||||
- A new paramater sqlfilters was introduced to allow filter on any fields int the REST API. Few old parameters,
|
- A new paramater sqlfilters was introduced to allow filter on any fields int the REST API. Few old parameters,
|
||||||
no more required, were also removed. Use this new one if you were using one of them.
|
no more required, were also removed. Use this new one if you were using one of them.
|
||||||
|
- The trigger that activate or close a contract line is run on a contract line, not on contract.
|
||||||
|
|
||||||
|
Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful on PHP 7.1 but we don't have enough
|
||||||
|
feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 4.0.3 to 4.0.2 *****
|
||||||
|
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
|
||||||
|
FIX: #5958 no discount on supplier command made by replenishment
|
||||||
|
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
|
||||||
|
FIX: #5972 #5734
|
||||||
|
FIX: #6007
|
||||||
|
FIX: #6010
|
||||||
|
FIX: #6029
|
||||||
|
FIX: #6043 - Payment mode not visible on supplier invoice list
|
||||||
|
FIX: #6051
|
||||||
|
FIX: #6062
|
||||||
|
FIX: #6088
|
||||||
|
FIX: A draft can be deleted by a user with create permission.
|
||||||
|
FIX: bad permission to see contract on home page
|
||||||
|
FIX: bad permission to see contract statistics
|
||||||
|
FIX: Bcc must not appears to recipient when using SMTPs lib
|
||||||
|
FIX: Consistent description for add or edit product
|
||||||
|
FIX: delete contract extrafields on contract deletion
|
||||||
|
FIX: Deposits and credit notes weren't added in the received and pending columns
|
||||||
|
FIX: export extrafields must not include separe type
|
||||||
|
FIX: Export of opportunity status must be code, not id.
|
||||||
|
FIX: False positive on services not activated
|
||||||
|
FIX: Filter was wrong or lost during navigation
|
||||||
|
FIX: HT and TTC price should always be displayed together
|
||||||
|
FIX: if a supplier price reference is changed after creating an order, we can't clone order.
|
||||||
|
FIX: in export. Error when using a separate extrafields.
|
||||||
|
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
|
||||||
|
FIX: javascript error when using on mobile/smartphone
|
||||||
|
FIX: javascript xss injection and a translation
|
||||||
|
FIX: Label of project is in field title not label.
|
||||||
|
FIX: List of people able to validate an expense report was not complete.
|
||||||
|
FIX: Missing field
|
||||||
|
FIX: Module gravatar was not triggered on thirdparty and contact card
|
||||||
|
FIX: Must use external link into a forged email content.
|
||||||
|
FIX: Pb in management of date end of projects
|
||||||
|
FIX: Regression when deleting product
|
||||||
|
FIX: rendering of output of estimated amount on project overview page.
|
||||||
|
FIX: Sanitize title of ajax_dialog
|
||||||
|
FIX: Security to restrict email sending was not efficient
|
||||||
|
FIX: Setting supplier as client when accept a supplier proposal
|
||||||
|
FIX: Some statistics not compatible with multicompany module.
|
||||||
|
FIX: the time spent on project was not visible in its overwiew
|
||||||
|
FIX: Update intervention lline crash with PgSQL
|
||||||
|
FIX: wrong test on dict.php
|
||||||
|
FIX: wrong var name
|
||||||
|
|
||||||
***** ChangeLog for 4.0.2 compared to 4.0.1 *****
|
***** ChangeLog for 4.0.2 compared to 4.0.1 *****
|
||||||
FIX: #5340
|
FIX: #5340
|
||||||
@ -139,12 +298,12 @@ NEW: Add the admin info on combo of type of contact
|
|||||||
NEW: Add the event BILL_PAYED to the list of supported events for module notification.
|
NEW: Add the event BILL_PAYED to the list of supported events for module notification.
|
||||||
NEW: Add total weight and volume on PDF.
|
NEW: Add total weight and volume on PDF.
|
||||||
NEW: Add hidden option to hide column qty ordered on shipments.
|
NEW: Add hidden option to hide column qty ordered on shipments.
|
||||||
NEW: Add view of virtual stock into product list (when appropriate).
|
NEW: Add view of virtual stock into product list (when appropriate)
|
||||||
NEW: Add warning on tasks when they are late (add also the warning tolerance parameter).
|
NEW: Add warning on tasks when they are late (add also the warning tolerance parameter)
|
||||||
NEW: Add weight/volume for one product into shipment export.
|
NEW: Add weight/volume for one product into shipment export
|
||||||
NEW: Add width and height on product card
|
NEW: Add width and height on product table
|
||||||
NEW: allow a document to be linked to project of another customer by config setup.
|
NEW: allow a document to be linked to project from another customer on config
|
||||||
NEW: allow project to be shared across entities (for multicompany module).
|
NEW: allow project to be shared across entities (for multicompany module)
|
||||||
NEW: All variant of ckeditor config can be tested into the setup page of module.
|
NEW: All variant of ckeditor config can be tested into the setup page of module.
|
||||||
NEW: Can change dynamically number of records visible into lists.
|
NEW: Can change dynamically number of records visible into lists.
|
||||||
NEW: Can change type of extrafields (for some combinations only).
|
NEW: Can change type of extrafields (for some combinations only).
|
||||||
@ -247,6 +406,115 @@ So if you included it into your module, change your code like this to be compati
|
|||||||
if (! $res) include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
|
if (! $res) include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.9.4 compared to 3.9.3 *****
|
||||||
|
FIX: #2853
|
||||||
|
FIX: #3128
|
||||||
|
FIX: #4447
|
||||||
|
FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
|
||||||
|
FIX: #5340
|
||||||
|
FIX: #5473
|
||||||
|
FIX: #5474 Country_id of "Don" object is still empty
|
||||||
|
FIX: #5534
|
||||||
|
FIX: #5535 bad dependency.
|
||||||
|
FIX: #5537 AJAX project search does not work properly
|
||||||
|
FIX: #5540 getFormMail is not registered as addReplace hook
|
||||||
|
FIX: #5544 Disabled Contact still appear in lists to send emails
|
||||||
|
FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
|
||||||
|
FIX: #5568
|
||||||
|
FIX: #5594
|
||||||
|
FIX: #5629 PgSQL Interger string stylish error
|
||||||
|
FIX: #5651
|
||||||
|
FIX: #5660
|
||||||
|
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
|
||||||
|
FIX: #5907
|
||||||
|
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
|
||||||
|
FIX: #6051
|
||||||
|
FIX: #6088
|
||||||
|
FIX: Can correct stock of lot using eatby or sell by date
|
||||||
|
FIX: Can make a movement on "out of sell" products
|
||||||
|
FIX: cannot update bank account on invoice if module order not activated
|
||||||
|
FIX: Can't create withdrawal document
|
||||||
|
FIX: delete contract extrafields on contract deletion
|
||||||
|
FIX: Direction of movement lost if an error occurs
|
||||||
|
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
|
||||||
|
FIX: export extrafields must not include separe type
|
||||||
|
FIX: External user must not be able to edit its discounts
|
||||||
|
FIX: Failed to export contact categories with contact extra fields
|
||||||
|
FIX: header title in commercial area
|
||||||
|
FIX: HT and TTC price should always be displayed together
|
||||||
|
FIX: incoterms
|
||||||
|
FIX: incoterms do not output into crabe invoice PDF
|
||||||
|
FIX: in PgSQL no quote "word style" is permitted around column name
|
||||||
|
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
|
||||||
|
FIX: margin tab on customer card must filter on current entity invoices
|
||||||
|
FIX: missing column into SQL on thridparty list
|
||||||
|
FIX: only show projects of related third if external user
|
||||||
|
FIX: PgSQL Module Ressource list crash #5637
|
||||||
|
FIX: php Strict
|
||||||
|
FIX: Regression when deleting product
|
||||||
|
FIX: Security to restrict email sending was not efficient
|
||||||
|
FIX: tag for date rfc in odt substitution
|
||||||
|
FIX: Update intervention lline crash with PgSQL
|
||||||
|
FIX: update limit stock on product stock
|
||||||
|
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
|
||||||
|
FIX: wrong test on dict.php
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.9.4 compared to 3.9.3 *****
|
||||||
|
FIX: #2853
|
||||||
|
FIX: #3128
|
||||||
|
FIX: #4447
|
||||||
|
FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
|
||||||
|
FIX: #5340
|
||||||
|
FIX: #5473
|
||||||
|
FIX: #5474 Country_id of "Don" object is still empty
|
||||||
|
FIX: #5534
|
||||||
|
FIX: #5535 bad dependency.
|
||||||
|
FIX: #5537 AJAX project search does not work properly
|
||||||
|
FIX: #5540 getFormMail is not registered as addReplace hook
|
||||||
|
FIX: #5544 Disabled Contact still appear in lists to send emails
|
||||||
|
FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
|
||||||
|
FIX: #5568
|
||||||
|
FIX: #5594
|
||||||
|
FIX: #5629 PgSQL Interger string stylish error
|
||||||
|
FIX: #5651
|
||||||
|
FIX: #5660
|
||||||
|
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
|
||||||
|
FIX: #5907
|
||||||
|
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
|
||||||
|
FIX: #6051
|
||||||
|
FIX: #6088
|
||||||
|
FIX: Can correct stock of lot using eatby or sell by date
|
||||||
|
FIX: Can make a movement on "out of sell" products
|
||||||
|
FIX: cannot update bank account on invoice if module order not activated
|
||||||
|
FIX: Can't create withdrawal document
|
||||||
|
FIX: delete contract extrafields on contract deletion
|
||||||
|
FIX: Direction of movement lost if an error occurs
|
||||||
|
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
|
||||||
|
FIX: export extrafields must not include separe type
|
||||||
|
FIX: External user must not be able to edit its discounts
|
||||||
|
FIX: Failed to export contact categories with contact extra fields
|
||||||
|
FIX: header title in commercial area
|
||||||
|
FIX: HT and TTC price should always be displayed together
|
||||||
|
FIX: incoterms
|
||||||
|
FIX: incoterms do not output into crabe invoice PDF
|
||||||
|
FIX: in PgSQL no quote "word style" is permitted around column name
|
||||||
|
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
|
||||||
|
FIX: margin tab on customer card must filter on current entity invoices
|
||||||
|
FIX: missing column into SQL on thridparty list
|
||||||
|
FIX: only show projects of related third if external user
|
||||||
|
FIX: PgSQL Module Ressource list crash #5637
|
||||||
|
FIX: php Strict
|
||||||
|
FIX: Regression when deleting product
|
||||||
|
FIX: Security to restrict email sending was not efficient
|
||||||
|
FIX: tag for date rfc in odt substitution
|
||||||
|
FIX: Update intervention lline crash with PgSQL
|
||||||
|
FIX: update limit stock on product stock
|
||||||
|
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
|
||||||
|
FIX: wrong test on dict.php
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
|
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
|
||||||
FIX: #4383 $userid not defined
|
FIX: #4383 $userid not defined
|
||||||
FIX: #4448 $filebonprev is not used, $this->filename now
|
FIX: #4448 $filebonprev is not used, $this->filename now
|
||||||
|
|||||||
19
README-FR.md
19
README-FR.md
@ -54,19 +54,10 @@ Pour mettre a jour Dolibarr depuis une vieille version vers celle ci:
|
|||||||
- Ecraser les vieux fichiers dans le vieux repertoire 'dolibarr' par les fichiers
|
- Ecraser les vieux fichiers dans le vieux repertoire 'dolibarr' par les fichiers
|
||||||
fournis dans ce nouveau package.
|
fournis dans ce nouveau package.
|
||||||
|
|
||||||
- Si vous venez d'une version x.y.z vers x.y.w (seul le 3eme chiffre varie),
|
- Au prochain accès, Dolibarr proposera la page de "mise a jour" des données (si necessaire).
|
||||||
il n'y a pas besoin de migration de données.
|
Si un fichier install.lock existe pour vérouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transféré sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
|
||||||
|
|
||||||
- Si vous venez d'une beta ou d'un version x.y.z vers une autre ou les numeros x
|
*Note: Le processus de migration peut etre lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
|
||||||
ou y varient, vous devez appelez la page "install/" de migration dans votre
|
|
||||||
navigateur (ceci doit se faire automatiquement au premier accès de l'application).
|
|
||||||
Ce sera une URL du genre:
|
|
||||||
http://localhost/dolibarr/htdocs/install/index.php
|
|
||||||
ou
|
|
||||||
http://yourdolibarrhost/install/index.php
|
|
||||||
|
|
||||||
Ensuite, choisir l'option de "mise a jour" en rapport avec votre cas.
|
|
||||||
Note: Le processus de migration peut etre lance plusieurs fois sans risque.
|
|
||||||
|
|
||||||
|
|
||||||
## CE QUI EST NOUVEAU
|
## CE QUI EST NOUVEAU
|
||||||
@ -86,11 +77,13 @@ Voir fichier ChangeLog.
|
|||||||
- Gestion des factures clients/fournisseurs et paiements
|
- Gestion des factures clients/fournisseurs et paiements
|
||||||
- Gestion des virements bancaires SEPA
|
- Gestion des virements bancaires SEPA
|
||||||
- Gestion des comptes bancaires
|
- Gestion des comptes bancaires
|
||||||
- Agenda partagé
|
- Calendrier/Agenda partagé (avec export ical, vcal)
|
||||||
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
|
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
|
||||||
- Gestion de contrats de services
|
- Gestion de contrats de services
|
||||||
- Gestion de stock
|
- Gestion de stock
|
||||||
- Gestion des expéditions
|
- Gestion des expéditions
|
||||||
|
- Gestion des demandes de congès
|
||||||
|
- Gestion des notes de frais
|
||||||
- GED (Gestion Electronique de Documents)
|
- GED (Gestion Electronique de Documents)
|
||||||
- EMailings de masse
|
- EMailings de masse
|
||||||
- Réalisation de sondages
|
- Réalisation de sondages
|
||||||
|
|||||||
22
README.md
22
README.md
@ -26,6 +26,16 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
|
|||||||
|
|
||||||
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||||
|
|
||||||
|
### Install from composer
|
||||||
|
If you do not already have Composer installed, you may do so by following the instructions at getcomposer.org. On Linux and Mac OS X, you'll run the following commands:
|
||||||
|
|
||||||
|
curl -sS https://getcomposer.org/installer | php
|
||||||
|
mv composer.phar /usr/local/bin/composer
|
||||||
|
|
||||||
|
On Windows, you'll download and run https://getcomposer.org/Composer-Setup.exe
|
||||||
|
|
||||||
|
composer create-project dolibarr/dolibarr erp
|
||||||
|
|
||||||
### Simple setup
|
### Simple setup
|
||||||
|
|
||||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in few clicks, you can use one of the packaged versions:
|
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in few clicks, you can use one of the packaged versions:
|
||||||
@ -60,10 +70,10 @@ You can use a Web server and a supported database (MariaDb, MySql or Postgresql)
|
|||||||
## UPGRADING
|
## UPGRADING
|
||||||
|
|
||||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||||
- If you're upgrading from version x.y.z to x.y.w (only third number differs), there is no need to run any migration process.
|
- At first next access, Dolibarr will redirect your to the "install/" page to make the upgrade process.
|
||||||
- If you're upgrading from a beta version or from any version x.y.z to any other where x or y number differs, you must call the Dolibarr "install/" page in your browser (this should be done automatically at first dolibarr access) and follow the upgrade process.
|
If a file install.lock exists to lock any run of upgrade process, the application will ask you to remove the file manually (you should find the install.lock file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "documents").
|
||||||
|
|
||||||
*Note: migration process can safely be done multiple times.*
|
*Note: migration process can safely be done multiple times by calling the page /install/index.php*
|
||||||
|
|
||||||
## WHAT'S NEW
|
## WHAT'S NEW
|
||||||
|
|
||||||
@ -80,17 +90,17 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||||||
- Invoices and payment management
|
- Invoices and payment management
|
||||||
- Standing orders management (European SEPA)
|
- Standing orders management (European SEPA)
|
||||||
- Bank accounts management
|
- Bank accounts management
|
||||||
- Shared calendar
|
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||||
- Opportunities and/or project management (following project benefit including invoices, expense reports, time spent, ...)
|
- Opportunities and/or project management (following project benefit including invoices, expense reports, time spent, ...)
|
||||||
- Projects management
|
- Projects management
|
||||||
- Contracts management
|
- Contracts management
|
||||||
- Stock management
|
- Stock management
|
||||||
- Shipping management
|
- Shipping management
|
||||||
- Interventions management
|
- Interventions management
|
||||||
- Agenda with ical and vcal export for third party tools integration
|
- Employee's leave requests management
|
||||||
|
- Expense report management
|
||||||
- Electronic Document Management (EDM)
|
- Electronic Document Management (EDM)
|
||||||
- Foundations members management
|
- Foundations members management
|
||||||
- Employee's holidays management
|
|
||||||
- Mass emailing
|
- Mass emailing
|
||||||
- Surveys
|
- Surveys
|
||||||
- Point of Sale
|
- Point of Sale
|
||||||
|
|||||||
@ -320,8 +320,8 @@ x.y.z+dfsgw
|
|||||||
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
|
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
|
||||||
|
|
||||||
* Update/fix debian/* files used to build package.
|
* Update/fix debian/* files used to build package.
|
||||||
At least, add an entry into debian/changelog
|
At least, add an entry into debian/changelog with command
|
||||||
> dch -v x.y.z+dfsgw-v "My comment" will add entry.
|
> dch -v x.y.z+dfsgw-1 "My comment"
|
||||||
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increased for each new import)
|
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increased for each new import)
|
||||||
Then check/modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
Then check/modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||||
Then check/modify also the user/date signature:
|
Then check/modify also the user/date signature:
|
||||||
@ -332,7 +332,9 @@ Then check/modify also the user/date signature:
|
|||||||
To update dolibarr debian package when only files into debian has changed:
|
To update dolibarr debian package when only files into debian has changed:
|
||||||
|
|
||||||
* Change files and commit.
|
* Change files and commit.
|
||||||
* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2, 3...)
|
* Add a line into changelog for version debian/x.y.z+dfsgw-v (increase the last v into 2, 3...)
|
||||||
|
> dch -v x.y.z+dfsgw-v "My comment"
|
||||||
|
* git tag will be added when package is pushed.
|
||||||
|
|
||||||
|
|
||||||
To update dolibarr debian package when only files not into debian has changed:
|
To update dolibarr debian package when only files not into debian has changed:
|
||||||
|
|||||||
@ -221,7 +221,13 @@ $dolibarr_main_prod='0';
|
|||||||
# $dolibarr_main_limit_users='0';
|
# $dolibarr_main_limit_users='0';
|
||||||
|
|
||||||
# dolibarr_mailing_limit_sendbyweb
|
# dolibarr_mailing_limit_sendbyweb
|
||||||
# Can set a limit for mailing send by web, can be used for a restricted mode.
|
# Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
|
||||||
# Default value: 0 (use database value if exist)
|
# Default value: 0 (use database value if exist)
|
||||||
# Examples:
|
# Examples:
|
||||||
# $dolibarr_mailing_limit_sendbyweb='0';
|
# $dolibarr_mailing_limit_sendbyweb='0';
|
||||||
|
|
||||||
|
# dolibarr_mailing_limit_sendbycli
|
||||||
|
# Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level.
|
||||||
|
# Default value: 0 (use database value if exist)
|
||||||
|
# Examples:
|
||||||
|
# $dolibarr_mailing_limit_sendbycli='0';
|
||||||
|
|||||||
@ -26,11 +26,11 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
|||||||
# Misc dependencies
|
# Misc dependencies
|
||||||
# fonts-dejavu-core | ttf-dejavu-core,
|
# fonts-dejavu-core | ttf-dejavu-core,
|
||||||
xdg-utils,
|
xdg-utils,
|
||||||
virtual-mysql-client,
|
mariadb-client | virtual-mysql-client,
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
${perl:Depends}
|
${perl:Depends}
|
||||||
Recommends: apache2 | lighttpd | httpd,
|
Recommends: apache2 | lighttpd | httpd,
|
||||||
virtual-mysql-server
|
mariadb-server | virtual-mysql-server
|
||||||
Suggests: www-browser, php5-geoip
|
Suggests: www-browser, php5-geoip
|
||||||
Description: Web based software to manage a company or foundation
|
Description: Web based software to manage a company or foundation
|
||||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
# Remove warning, we want to keep both standard and minified sources.
|
# Remove warning, we want to keep both standard and minified sources.
|
||||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
|
|
||||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
|
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
|
||||||
# This is a textual data file
|
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
|
||||||
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
|
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jstz/*
|
||||||
|
# Those are false positives, the files are their own sources since
|
||||||
|
# they are not minified
|
||||||
|
source-is-missing htdocs/includes/jsgantt/jsgantt.js *
|
||||||
|
source-is-missing htdocs/includes/jquery/plugins/colorpicker/jquery.colorpicker.js *
|
||||||
|
source-is-missing htdocs/includes/jquery/plugins/select2/select2.js *
|
||||||
|
source-is-missing htdocs/includes/jquery/plugins/select2/select2_locale_ar.js *
|
||||||
|
|||||||
22
build/generate_filelist_xml.php
Normal file → Executable file
22
build/generate_filelist_xml.php
Normal file → Executable file
@ -65,6 +65,8 @@ fputs($fp, '<checksum_list version="'.$release.'">'."\n");
|
|||||||
|
|
||||||
fputs($fp, '<dolibarr_htdocs_dir>'."\n");
|
fputs($fp, '<dolibarr_htdocs_dir>'."\n");
|
||||||
|
|
||||||
|
$checksumconcat=array();
|
||||||
|
|
||||||
$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
|
$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
|
||||||
$iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
$iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||||
// need to ignore document custom etc
|
// need to ignore document custom etc
|
||||||
@ -81,12 +83,22 @@ foreach ($files as $file) {
|
|||||||
$needtoclose=1;
|
$needtoclose=1;
|
||||||
}
|
}
|
||||||
if (filetype($file)=="file") {
|
if (filetype($file)=="file") {
|
||||||
fputs($fp, '<md5file name="'.basename($file).'">'.md5_file($file).'</md5file>'."\n");
|
$md5=md5_file($file);
|
||||||
|
$checksumconcat[]=$md5;
|
||||||
|
fputs($fp, '<md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fputs($fp, '</dir>'."\n");
|
fputs($fp, '</dir>'."\n");
|
||||||
fputs($fp, '</dolibarr_htdocs_dir>'."\n");
|
fputs($fp, '</dolibarr_htdocs_dir>'."\n");
|
||||||
|
|
||||||
|
asort($checksumconcat); // Sort list of checksum
|
||||||
|
//var_dump($checksumconcat);
|
||||||
|
fputs($fp, '<dolibarr_htdocs_dir_checksum>'."\n");
|
||||||
|
fputs($fp, md5(join(',',$checksumconcat))."\n");
|
||||||
|
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
|
||||||
|
|
||||||
|
|
||||||
|
$checksumconcat=array();
|
||||||
|
|
||||||
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
|
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
|
||||||
|
|
||||||
@ -106,12 +118,18 @@ foreach ($files as $file) {
|
|||||||
$needtoclose=1;
|
$needtoclose=1;
|
||||||
}
|
}
|
||||||
if (filetype($file)=="file") {
|
if (filetype($file)=="file") {
|
||||||
fputs($fp, '<md5file name="'.basename($file).'">'.md5_file($file).'</md5file>'."\n");
|
$md5=md5_file($file);
|
||||||
|
$checksumconcat[]=$md5;
|
||||||
|
fputs($fp, '<md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fputs($fp, '</dir>'."\n");
|
fputs($fp, '</dir>'."\n");
|
||||||
fputs($fp, '</dolibarr_script_dir>'."\n");
|
fputs($fp, '</dolibarr_script_dir>'."\n");
|
||||||
|
|
||||||
|
asort($checksumconcat); // Sort list of checksum
|
||||||
|
fputs($fp, '<dolibarr_script_dir_checksum>'."\n");
|
||||||
|
fputs($fp, md5(join(',',$checksumconcat))."\n");
|
||||||
|
fputs($fp, '</dolibarr_script_dir_checksum>'."\n");
|
||||||
|
|
||||||
fputs($fp, '</checksum_list>'."\n");
|
fputs($fp, '</checksum_list>'."\n");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|||||||
@ -1145,6 +1145,9 @@ if ($nboftargetok) {
|
|||||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||||
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'none', # none means it won't be published on SF
|
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'none', # none means it won't be published on SF
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
|
||||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
||||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||||
@ -1155,6 +1158,10 @@ if ($nboftargetok) {
|
|||||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
||||||
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'package_rpm_generic',
|
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'package_rpm_generic',
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
||||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
||||||
|
|||||||
@ -12,6 +12,7 @@ beta version of Dolibarr, step by step.
|
|||||||
To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
|
- To know number of lines changes: git diff --shortstat A B
|
||||||
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
||||||
- Commit all changes.
|
- Commit all changes.
|
||||||
|
|
||||||
@ -35,6 +36,7 @@ complete release of Dolibarr, step by step.
|
|||||||
To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
|
- To know number of lines changes: git diff --shortstat A B
|
||||||
- Update version number with x.y.z in htdocs/filefunc.inc.php
|
- Update version number with x.y.z in htdocs/filefunc.inc.php
|
||||||
- Commit all changes.
|
- Commit all changes.
|
||||||
|
|
||||||
|
|||||||
@ -162,7 +162,7 @@ export res=$?
|
|||||||
|
|
||||||
|
|
||||||
# ---------------------------- copy demo files
|
# ---------------------------- copy demo files
|
||||||
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" `
|
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
|
||||||
if [ "x$documentdir" != "x" ]
|
if [ "x$documentdir" != "x" ]
|
||||||
then
|
then
|
||||||
echo cp -pr $mydir/documents_demo/* "$documentdir/"
|
echo cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||||
@ -174,7 +174,7 @@ then
|
|||||||
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||||
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||||
else
|
else
|
||||||
echo Detection of documents directory failed so demo files were not copied.
|
echo Detection of documents directory $documentdir failed so demo files were not copied.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
8737
dev/initdemo/mysqldump_dolibarr_5.0.0.sql
Normal file
8737
dev/initdemo/mysqldump_dolibarr_5.0.0.sql
Normal file
File diff suppressed because one or more lines are too long
28
dev/setup/nginx/dolibarr
Normal file
28
dev/setup/nginx/dolibarr
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Dolibarr server configuration sample for NGinx
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
|
||||||
|
root /path/to/your/htdocs;
|
||||||
|
|
||||||
|
# Optionnal
|
||||||
|
error_log /path/to/your/log/directory/nginx.error.log;
|
||||||
|
access_log /path/to/your/log/directory/nginx.access.log;
|
||||||
|
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
# Optionnal
|
||||||
|
server_name your-fqdn.tld;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ [^/]\.php(/|$) {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_read_timeout 600;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -303,7 +303,7 @@ foreach($property as $key => $prop)
|
|||||||
$varprop.="\$this->db->escape(\$this->".$prop['field'].")";
|
$varprop.="\$this->db->escape(\$this->".$prop['field'].")";
|
||||||
$varprop.=".\"'\")";
|
$varprop.=".\"'\")";
|
||||||
}
|
}
|
||||||
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author')
|
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_m' || $prop['field']=='fk_user_author')
|
||||||
{
|
{
|
||||||
$varprop.="'.\$user->id";
|
$varprop.="'.\$user->id";
|
||||||
}
|
}
|
||||||
@ -367,7 +367,7 @@ foreach($property as $key => $prop)
|
|||||||
$varprop.=')."\'" : \'null\')';
|
$varprop.=')."\'" : \'null\')';
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif ($prop['field']=='fk_user_mod') {
|
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_m') {
|
||||||
$varprop.="'.\$user->id";
|
$varprop.="'.\$user->id";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class modMyModule extends DolibarrModules
|
|||||||
$this->description = "Description of module MyModule";
|
$this->description = "Description of module MyModule";
|
||||||
$this->descriptionlong = "A very long description. Can be a full HTML content";
|
$this->descriptionlong = "A very long description. Can be a full HTML content";
|
||||||
$this->editor_name = 'Editor name';
|
$this->editor_name = 'Editor name';
|
||||||
$this->editor_url = 'http://www.dolibarr.org';
|
$this->editor_url = 'https://www.dolibarr.org';
|
||||||
|
|
||||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
|
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
|
||||||
$this->version = '1.0';
|
$this->version = '1.0';
|
||||||
|
|||||||
@ -188,10 +188,12 @@ class Skeleton_Class extends CommonObject
|
|||||||
|
|
||||||
// Retrieve all extrafields for invoice
|
// Retrieve all extrafields for invoice
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
|
/*
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
$extrafields=new ExtraFields($this->db);
|
$extrafields=new ExtraFields($this->db);
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||||
$this->fetch_optionals($this->id,$extralabels);
|
$this->fetch_optionals($this->id,$extralabels);
|
||||||
|
*/
|
||||||
|
|
||||||
// $this->fetch_lines();
|
// $this->fetch_lines();
|
||||||
|
|
||||||
@ -251,23 +253,19 @@ class Skeleton_Class extends CommonObject
|
|||||||
$sql .= $this->db->order($sortfield,$sortorder);
|
$sql .= $this->db->order($sortfield,$sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($limit)) {
|
if (!empty($limit)) {
|
||||||
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
$sql .= ' ' . $this->db->plimit($limit, $offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->lines = array();
|
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
|
|
||||||
while ($obj = $this->db->fetch_object($resql)) {
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
$line = new Skeleton_ClassLine();
|
$line = new self($this->db);
|
||||||
|
|
||||||
$line->id = $obj->rowid;
|
$line->id = $obj->rowid;
|
||||||
$line->prop1 = $obj->field1;
|
$line->prop1 = $obj->field1;
|
||||||
$line->prop2 = $obj->field2;
|
$line->prop2 = $obj->field2;
|
||||||
|
|
||||||
$this->lines[$line->id] = $line;
|
|
||||||
//...
|
//...
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2016 Jean-François Ferry <jfefe@aternatik.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
|
||||||
@ -88,8 +89,11 @@ if ($user->societe_id > 0)
|
|||||||
//accessforbidden();
|
//accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize technical object to manage context to save list fields
|
||||||
|
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'mymodulelist';
|
||||||
|
|
||||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||||
$hookmanager->initHooks(array('skeletonlist'));
|
$hookmanager->initHooks(array('mymodulelist'));
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
@ -216,7 +220,7 @@ $parameters=array();
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
$sql.=$hookmanager->resPrint;
|
$sql.=$hookmanager->resPrint;
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (u.rowid = ef.fk_object)";
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||||
$sql.= " WHERE 1 = 1";
|
$sql.= " WHERE 1 = 1";
|
||||||
//$sql.= " WHERE u.entity IN (".getEntity('mytable',1).")";
|
//$sql.= " WHERE u.entity IN (".getEntity('mytable',1).")";
|
||||||
if ($search_field1) $sql.= natural_search("field1",$search_field1);
|
if ($search_field1) $sql.= natural_search("field1",$search_field1);
|
||||||
@ -243,7 +247,7 @@ $sql.=$db->order($sortfield,$sortorder);
|
|||||||
//$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -304,6 +308,7 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
|||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
||||||
|
|
||||||
@ -333,6 +338,7 @@ if (! empty($moreforfilter))
|
|||||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
// Fields title
|
// Fields title
|
||||||
@ -535,6 +541,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
print '</div>'."\n";
|
||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
|
|||||||
@ -42,11 +42,15 @@ then
|
|||||||
then
|
then
|
||||||
aaupper="US"
|
aaupper="US"
|
||||||
fi
|
fi
|
||||||
|
if [ $aaupper = "EL" ]
|
||||||
|
then
|
||||||
|
aaupper="GR"
|
||||||
|
fi
|
||||||
bblower=`echo $dirshort | nawk -F"_" '{ print tolower($2) }'`
|
bblower=`echo $dirshort | nawk -F"_" '{ print tolower($2) }'`
|
||||||
if [ "$aa" != "$bblower" -a "$dirshort" != "en_US" ]
|
if [ "$aa" != "$bblower" -a "$dirshort" != "en_US" ]
|
||||||
then
|
then
|
||||||
reflang="htdocs/langs/"$aa"_"$aaupper
|
reflang="htdocs/langs/"$aa"_"$aaupper
|
||||||
if [ -d $reflang ]
|
if [ -d $reflang -a $aa"_"$bb != $aa"_"$aaupper ]
|
||||||
then
|
then
|
||||||
echo "***** Process language "$aa"_"$bb" - Search original into "$reflang
|
echo "***** Process language "$aa"_"$bb" - Search original into "$reflang
|
||||||
echo $dirshort is an alternative language of $reflang
|
echo $dirshort is an alternative language of $reflang
|
||||||
|
|||||||
@ -17,14 +17,14 @@ fi
|
|||||||
# To detec
|
# To detec
|
||||||
if [ "x$1" = "xlist" ]
|
if [ "x$1" = "xlist" ]
|
||||||
then
|
then
|
||||||
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep CRLF
|
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep CRLF
|
||||||
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF
|
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# To convert
|
# To convert
|
||||||
if [ "x$1" = "xfix" ]
|
if [ "x$1" = "xfix" ]
|
||||||
then
|
then
|
||||||
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' `
|
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' `
|
||||||
do
|
do
|
||||||
echo "Fix file $fic"
|
echo "Fix file $fic"
|
||||||
dos2unix "$fic"
|
dos2unix "$fic"
|
||||||
|
|||||||
8
dev/tools/github_authors_peryear.sh
Executable file
8
dev/tools/github_authors_peryear.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
FROM=2016-01-01
|
||||||
|
TO=2016-12-31
|
||||||
|
|
||||||
|
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
|
||||||
|
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
|
||||||
|
|
||||||
15
dev/tools/github_commits_perversion.sh
Executable file
15
dev/tools/github_commits_perversion.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#/bin/bash
|
||||||
|
Releases=("3.8" "3.9" "4.0" "5.0", "develop")
|
||||||
|
Dates=("2010-01-01", "2011-01-01", "2012-01-01", "2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01")
|
||||||
|
let "counter = 1"
|
||||||
|
|
||||||
|
for i in "${Releases[@]}"
|
||||||
|
do
|
||||||
|
git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}
|
||||||
|
echo -n "Total $i: "
|
||||||
|
git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l
|
||||||
|
echo "======================="
|
||||||
|
echo
|
||||||
|
let "counter +=1"
|
||||||
|
done
|
||||||
|
|
||||||
@ -39,8 +39,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<!-- Password -->
|
<!-- Password -->
|
||||||
<tr><td valign="top" class="nowrap"> <strong><label for="password">Mot de passe</label></strong> </td>
|
<tr><td class="tdtop nowrap"> <strong><label for="password">Mot de passe</label></strong> </td>
|
||||||
<td valign="top" class="nowrap">
|
<td class="tdtop nowrap">
|
||||||
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="" tabindex="2" />
|
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="" tabindex="2" />
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
|||||||
14
dev/translation/erp_comparison_translation.txt
Normal file
14
dev/translation/erp_comparison_translation.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
Term Dolibarr SAP Odoo ...
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
Thirdparty Contact partner Partner/Contact (company)
|
||||||
|
Contact/address Contact person Partner/Contact (individual)
|
||||||
|
|
||||||
|
Financial ?? Invoicing
|
||||||
|
|
||||||
|
Income / Expense ?? Profit / Loss
|
||||||
|
Balance Net profit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ if (strlen(trim($search_pcgsubtype))) {
|
|||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|||||||
@ -888,18 +888,18 @@ if ($id)
|
|||||||
{
|
{
|
||||||
if ($value == 'country')
|
if ($value == 'country')
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td class="liste_titre">';
|
||||||
print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone');
|
print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($id == 4) print '<td></td>';
|
if ($id == 4) print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre" colspan="2" align="right">';
|
print '<td class="liste_titre" colspan="2" align="right">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
@ -1262,7 +1262,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
|
|
||||||
$formadmin = new FormAdmin($db);
|
$formadmin = new FormAdmin($db);
|
||||||
$formcompany = new FormCompany($db);
|
$formcompany = new FormCompany($db);
|
||||||
if (! empty($conf->accounting->enabled)) $formaccountancy = new FormVentilation($db);
|
$formaccountancy = new FormVentilation($db);
|
||||||
|
|
||||||
foreach ($fieldlist as $field => $value)
|
foreach ($fieldlist as $field => $value)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.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-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* 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>
|
||||||
@ -62,7 +62,10 @@ $list_account = array (
|
|||||||
'ACCOUNTING_VAT_PAY_ACCOUNT',
|
'ACCOUNTING_VAT_PAY_ACCOUNT',
|
||||||
'ACCOUNTING_ACCOUNT_SUSPENSE',
|
'ACCOUNTING_ACCOUNT_SUSPENSE',
|
||||||
'ACCOUNTING_ACCOUNT_TRANSFER_CASH',
|
'ACCOUNTING_ACCOUNT_TRANSFER_CASH',
|
||||||
'DONATION_ACCOUNTINGACCOUNT'
|
'DONATION_ACCOUNTINGACCOUNT',
|
||||||
|
'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
|
||||||
|
'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
|
||||||
|
'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ $sql .= " WHERE f.entity = " . $conf->entity;
|
|||||||
$sql.=$db->order($sortfield,$sortorder);
|
$sql.=$db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -268,7 +268,7 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td valign="top">';
|
print '<tr><td class="tdtop">';
|
||||||
print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
||||||
print '</td><td colspan="2">';
|
print '</td><td colspan="2">';
|
||||||
print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
||||||
|
|||||||
@ -248,7 +248,7 @@ if (strlen(trim($search_desc))) {
|
|||||||
}
|
}
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -65,14 +65,6 @@ $formventilation = new FormVentilation($db);
|
|||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
|
||||||
{
|
|
||||||
$search_accountancy_code_start = '';
|
|
||||||
$search_accountancy_code_end = '';
|
|
||||||
$search_date_start = '';
|
|
||||||
$search_date_end = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($search_date_start)) {
|
if (empty($search_date_start)) {
|
||||||
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
||||||
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
||||||
@ -106,6 +98,19 @@ if (! empty($search_accountancy_code_end)) {
|
|||||||
* Action
|
* Action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
|
{
|
||||||
|
$search_accountancy_code_start = '';
|
||||||
|
$search_accountancy_code_end = '';
|
||||||
|
$search_date_start = '';
|
||||||
|
$search_date_end = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'export_csv') {
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
$journal = 'bookkepping';
|
$journal = 'bookkepping';
|
||||||
@ -132,155 +137,147 @@ if ($action == 'export_csv') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
$title_page = $langs->trans("AccountBalance") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
||||||
|
|
||||||
$title_page = $langs->trans("AccountBalance") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
llxHeader('', $title_page);
|
||||||
|
|
||||||
llxHeader('', $title_page);
|
// List
|
||||||
|
|
||||||
/*
|
$nbtotalofrecords = '';
|
||||||
* List
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
*/
|
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
|
||||||
$nbtotalofrecords = 0;
|
if ($nbtotalofrecords < 0) {
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
|
}
|
||||||
if ($nbtotalofrecords < 0) {
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $object->fetchAllBalance($sortorder, $sortfield, $limit, $offset, $filter);
|
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, 0, 'title_accountancy');
|
|
||||||
|
|
||||||
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
|
||||||
print '<div class="tabsAction">' . "\n";
|
|
||||||
print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>';
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
$moreforfilter='';
|
|
||||||
|
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
|
||||||
$moreforfilter.=$langs->trans('DateStart') . ': ';
|
|
||||||
$moreforfilter.=$form->select_date($search_date_start, 'date_start', 0, 0, 1, '', 1, 0, 1);
|
|
||||||
$moreforfilter.=$langs->trans('DateEnd') . ': ';
|
|
||||||
$moreforfilter.=$form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
|
|
||||||
$moreforfilter.='</div>';
|
|
||||||
|
|
||||||
if (! empty($moreforfilter))
|
|
||||||
{
|
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
|
||||||
print $moreforfilter;
|
|
||||||
$parameters=array();
|
|
||||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
|
||||||
print $hookmanager->resPrint;
|
|
||||||
print '</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("Solde"), $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td colspan="2">';
|
|
||||||
print $langs->trans('From');
|
|
||||||
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
|
|
||||||
print '<br>';
|
|
||||||
print $langs->trans('to');
|
|
||||||
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print '<td> </td>';
|
|
||||||
print '<td> </td>';
|
|
||||||
print '<td> </td>';
|
|
||||||
|
|
||||||
print '<td align="right" class="liste_titre">';
|
|
||||||
print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" name="button_search" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
|
|
||||||
print ' ';
|
|
||||||
print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" name="button_removefilter" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var = True;
|
|
||||||
|
|
||||||
$total_debit = 0;
|
|
||||||
$total_credit = 0;
|
|
||||||
$sous_total_debit = 0;
|
|
||||||
$sous_total_credit = 0;
|
|
||||||
$displayed_account = "";
|
|
||||||
|
|
||||||
foreach ( $object->lines as $line ) {
|
|
||||||
$var = ! $var;
|
|
||||||
$link = '';
|
|
||||||
$total_debit += $line->debit;
|
|
||||||
$total_credit += $line->credit;
|
|
||||||
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
|
||||||
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
|
||||||
if(empty($description)){
|
|
||||||
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() .'</a>';
|
|
||||||
}
|
|
||||||
print '<tr'. $bc[$var].'>';
|
|
||||||
|
|
||||||
|
|
||||||
// Permet d'afficher le compte comptable
|
|
||||||
if ($root_account_description != $displayed_account) {
|
|
||||||
|
|
||||||
// Affiche un Sous-Total par compte comptable
|
|
||||||
if ($displayed_account != "") {
|
|
||||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td><td class="nowrap" align="right">'.price($sous_total_credit-$sous_total_debit).'</td>';
|
|
||||||
print "<td> </td>\n";
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Affiche le compte comptable en d<>but de ligne
|
|
||||||
print "<tr>";
|
|
||||||
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">'. $root_account_description .'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$displayed_account = $root_account_description;
|
|
||||||
$sous_total_debit = 0;
|
|
||||||
$sous_total_credit = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// $object->get_compte_racine($line->numero_compte);
|
$result = $object->fetchAllBalance($sortorder, $sortfield, $limit, $offset, $filter);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<td>' . $description . '</td>';
|
|
||||||
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>';
|
|
||||||
print '<td align="right">' . number_format($line->credit, 2, ',', ' ') . '</td>';
|
|
||||||
print '<td align="right">' . number_format($line->credit - $line->debit, 2, ',', ' ') . '</td>';
|
|
||||||
print '<td align="center">' . $link;
|
|
||||||
print '</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
// Comptabilise le sous-total
|
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" />';
|
||||||
$sous_total_debit += $line->debit;
|
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, 0, 'title_accountancy', 0, $button);
|
||||||
$sous_total_credit += $line->credit;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td><td class="nowrap" align="right">'.price($sous_total_credit-$sous_total_debit).'</td>';
|
|
||||||
print "<td> </td>\n";
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">'.price($total_debit).'</td><td class="nowrap" align="right">'.price($total_credit).'</td><td class="nowrap" align="right">'.price($total_credit-$total_debit).'</td>';
|
|
||||||
print "<td> </td>\n";
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
|
|
||||||
print "</table>";
|
$moreforfilter = '';
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
llxFooter();
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
|
$moreforfilter .= $langs->trans('DateStart') . ': ';
|
||||||
|
$moreforfilter .= $form->select_date($search_date_start, 'date_start', 0, 0, 1, '', 1, 0, 1);
|
||||||
|
$moreforfilter .= $langs->trans('DateEnd') . ': ';
|
||||||
|
$moreforfilter .= $form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
|
||||||
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
|
if (! empty($moreforfilter)) {
|
||||||
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||||
|
print $moreforfilter;
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Solde"), $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td class="liste_titre center" colspan="2">';
|
||||||
|
print $langs->trans('From');
|
||||||
|
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
|
||||||
|
print '<br>';
|
||||||
|
print $langs->trans('to');
|
||||||
|
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td class="liste_titre center"> </td>';
|
||||||
|
print '<td class="liste_titre center"> </td>';
|
||||||
|
print '<td class="liste_titre center"> </td>';
|
||||||
|
|
||||||
|
print '<td align="right" class="liste_titre">';
|
||||||
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
|
print $searchpitco;
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = True;
|
||||||
|
|
||||||
|
$total_debit = 0;
|
||||||
|
$total_credit = 0;
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
$displayed_account = "";
|
||||||
|
|
||||||
|
foreach ($object->lines as $line) {
|
||||||
|
$var = ! $var;
|
||||||
|
$link = '';
|
||||||
|
$total_debit += $line->debit;
|
||||||
|
$total_credit += $line->credit;
|
||||||
|
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
||||||
|
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
||||||
|
if (empty($description)) {
|
||||||
|
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
|
||||||
|
}
|
||||||
|
print '<tr' . $bc[$var] . '>';
|
||||||
|
|
||||||
|
// Permet d'afficher le compte comptable
|
||||||
|
if ($root_account_description != $displayed_account) {
|
||||||
|
|
||||||
|
// Affiche un Sous-Total par compte comptable
|
||||||
|
if ($displayed_account != "") {
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affiche le compte comptable en d<>but de ligne
|
||||||
|
print "<tr>";
|
||||||
|
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">' . $root_account_description . '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$displayed_account = $root_account_description;
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// $object->get_compte_racine($line->numero_compte);
|
||||||
|
|
||||||
|
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||||
|
print '<td>' . $description . '</td>';
|
||||||
|
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>';
|
||||||
|
print '<td align="right">' . number_format($line->credit, 2, ',', ' ') . '</td>';
|
||||||
|
print '<td align="right">' . number_format($line->credit - $line->debit, 2, ',', ' ') . '</td>';
|
||||||
|
print '<td align="center">' . $link;
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Comptabilise le sous-total
|
||||||
|
$sous_total_debit += $line->debit;
|
||||||
|
$sous_total_credit += $line->credit;
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price($total_credit - $total_debit) . '</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
}
|
}
|
||||||
$db->close();
|
$db->close();
|
||||||
@ -38,7 +38,7 @@ $langs->load("other");
|
|||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
$year = $_GET["year"];
|
$year = GETPOST("year",'int');
|
||||||
if ($year == 0) {
|
if ($year == 0) {
|
||||||
$year_current = strftime("%Y", time());
|
$year_current = strftime("%Y", time());
|
||||||
$year_start = $year_current;
|
$year_start = $year_current;
|
||||||
@ -47,9 +47,11 @@ if ($year == 0) {
|
|||||||
$year_start = $year;
|
$year_start = $year;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('', $langs->trans("Bookkeeping"));
|
llxHeader('', $langs->trans("Bookkeeping"));
|
||||||
|
|
||||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||||
|
|||||||
@ -288,12 +288,12 @@ if ($action == 'export_csv') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$title_page = $langs->trans("Bookkeeping");
|
$title_page = $langs->trans("Bookkeeping");
|
||||||
if ($search_date_start || $search_date_end) $title_page .= ' ' . dol_print_date($search_date_start, 'day') . ' - ' . dol_print_date($search_date_end, 'day');
|
|
||||||
llxHeader('', $title_page);
|
llxHeader('', $title_page);
|
||||||
|
|
||||||
// List
|
// List
|
||||||
|
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||||
if ($nbtotalofrecords < 0) {
|
if ($nbtotalofrecords < 0) {
|
||||||
@ -356,20 +356,21 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
|||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
$button = '<a class="butAction" name="button_export_csv" href="'.$_SERVER["PHP_SELF"].'?action=export_csv'.($param?'&'.$param:'').'">';
|
||||||
|
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
|
||||||
|
else $button.= $langs->trans("ExportList");
|
||||||
|
$button.= '</a>';
|
||||||
|
|
||||||
|
$groupby = ' <a href="./listbyaccount.php">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||||
|
|
||||||
|
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby, '', $limit);
|
||||||
|
|
||||||
print '<div class="tabsAction">' . "\n";
|
print '<div class="tabsAction">' . "\n";
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" name="button_export_csv" href="'.$_SERVER["PHP_SELF"].'?action=export_csv'.($param?'&'.$param:'').'">';
|
|
||||||
if (count($filter)) print $langs->trans("ExportFilteredList");
|
|
||||||
else print $langs->trans("ExportList");
|
|
||||||
print '</a></div>';
|
|
||||||
print '<div class="inline-block divButAction"><a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a></div>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print ' <a href="./listbyaccount.php">' . $langs->trans("GroupByAccountAccounting") . '</a><br><br>';
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
|
||||||
@ -385,7 +386,7 @@ print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" al
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>';
|
print '<td class="liste_titre center"><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>';
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print $langs->trans('From') . ': ';
|
print $langs->trans('From') . ': ';
|
||||||
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||||
@ -393,15 +394,15 @@ print '<br>';
|
|||||||
print $langs->trans('to') . ': ';
|
print $langs->trans('to') . ': ';
|
||||||
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>';
|
print '<td class="liste_titre center"><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>';
|
||||||
print '<td>';
|
print '<td class="liste_titre center">';
|
||||||
print $langs->trans('From');
|
print $langs->trans('From');
|
||||||
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
|
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print $langs->trans('to');
|
print $langs->trans('to');
|
||||||
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
|
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td class="liste_titre center">';
|
||||||
print $langs->trans('From');
|
print $langs->trans('From');
|
||||||
print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
|
print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -411,10 +412,10 @@ print '</td>';
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
|
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td class="liste_titre center"> </td>';
|
||||||
print '<td> </td>';
|
print '<td class="liste_titre center"> </td>';
|
||||||
print '<td align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
print '<td class="liste_titre center" align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||||
print '<td align="right" class="liste_titre">';
|
print '<td class="liste_titre center" align="right">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -156,13 +156,13 @@ if ($action == 'delmouvconfirm') {
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting");
|
||||||
|
|
||||||
llxHeader('', $title_page);
|
llxHeader('', $title_page);
|
||||||
|
|
||||||
// List
|
// List
|
||||||
|
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
$nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
|
$nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
|
||||||
if ($nbtotalofrecords < 0) {
|
if ($nbtotalofrecords < 0) {
|
||||||
@ -207,7 +207,9 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
|
|
||||||
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
|
|
||||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,'','',$limit);
|
$viewflat = ' <a href="./list.php">' . $langs->trans("ViewFlatList") . '</a>';
|
||||||
|
|
||||||
|
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,$viewflat,'',$limit);
|
||||||
|
|
||||||
// Reverse sort order
|
// Reverse sort order
|
||||||
if ( preg_match('/^asc/i', $sortorder) )
|
if ( preg_match('/^asc/i', $sortorder) )
|
||||||
@ -219,8 +221,6 @@ print '<div class="tabsAction">' . "\n";
|
|||||||
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print ' <a href="./list.php">' . $langs->trans("ViewFlatList") . '</a><br><br>';
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>' . $langs->trans("AccountAccounting") . '</td>';
|
print '<td>' . $langs->trans("AccountAccounting") . '</td>';
|
||||||
@ -235,9 +235,8 @@ print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60"
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
|
print '<td class="liste_titre">' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
|
||||||
print '<td>' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td></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, 'date_start', 0, 0, 1);
|
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||||
@ -247,10 +246,10 @@ print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/></td>';
|
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/></td>';
|
||||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_account" value="' . $search_label_account . '"/></td>';
|
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_account" value="' . $search_label_account . '"/></td>';
|
||||||
print '<td> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
print '<td class="liste_titre" align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||||
print '<td align="right" colspan="2" class="liste_titre">';
|
print '<td class="liste_titre" align="right" colspan="2">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -331,14 +330,15 @@ foreach ( $object->lines as $line ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Affiche un Sous-Total du dernier compte comptable affiché
|
// Affiche un Sous-Total du dernier compte comptable affiché
|
||||||
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
print '<tr class="liste_total">';
|
||||||
|
print '<td align="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||||
print "<td> </td>\n";
|
print "<td> </td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
// Affiche le Total
|
// Affiche le Total
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td align="right" colspan="4">'.$langs->trans("Total").':</td>';
|
print '<td align="right" colspan="5">'.$langs->trans("Total").':</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print price($total_debit);
|
print price($total_debit);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -158,7 +158,7 @@ if (! empty($search_code_journal)) {
|
|||||||
* Mode List
|
* Mode List
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0);
|
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0);
|
||||||
if ($nbtotalofrecords < 0) {
|
if ($nbtotalofrecords < 0) {
|
||||||
|
|||||||
@ -357,7 +357,7 @@ class AccountancyExport
|
|||||||
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20);
|
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20);
|
||||||
$Tab['sens'] = $data->sens; // C or D
|
$Tab['sens'] = $data->sens; // C or D
|
||||||
$Tab['signe_montant'] = '+';
|
$Tab['signe_montant'] = '+';
|
||||||
$Tab['montant'] = str_pad(abs($data->montant) * 100, 12, '0', STR_PAD_LEFT); // TODO manage negative amount
|
$Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount
|
||||||
$Tab['contrepartie'] = str_repeat(' ', 8);
|
$Tab['contrepartie'] = str_repeat(' ', 8);
|
||||||
if (! empty($data->date_echeance))
|
if (! empty($data->date_echeance))
|
||||||
$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
|
$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
|
||||||
@ -402,7 +402,7 @@ class AccountancyExport
|
|||||||
print length_accountg($line->numero_compte) . $this->separator;
|
print length_accountg($line->numero_compte) . $this->separator;
|
||||||
print substr(length_accountg($line->numero_compte),0,2) . $this->separator;
|
print substr(length_accountg($line->numero_compte),0,2) . $this->separator;
|
||||||
print '"'.dol_trunc($line->label_compte,40,'right','UTF-8',1).'"' . $this->separator;
|
print '"'.dol_trunc($line->label_compte,40,'right','UTF-8',1).'"' . $this->separator;
|
||||||
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1)."'".$this->separator;
|
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
|
||||||
print price2num($line->montant).$this->separator;
|
print price2num($line->montant).$this->separator;
|
||||||
print $line->sens.$this->separator;
|
print $line->sens.$this->separator;
|
||||||
print $date . $this->separator;
|
print $date . $this->separator;
|
||||||
|
|||||||
@ -60,10 +60,10 @@ class AccountingAccount extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load record in memory
|
* Load record in memory
|
||||||
*
|
*
|
||||||
* @param int $rowid Id
|
* @param int $rowid Id
|
||||||
* @param string $account_number Account number
|
* @param string $account_number Account number
|
||||||
* @param int $limittocurrentchart 1=Do not load record if it is into another accounting system
|
* @param int $limittocurrentchart 1=Do not load record if it is into another accounting system
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, Id of record if OK and found
|
||||||
*/
|
*/
|
||||||
function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) {
|
function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) {
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class BookKeeping extends CommonObject
|
|||||||
public $id;
|
public $id;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public $doc_date = '';
|
public $doc_date;
|
||||||
public $doc_type;
|
public $doc_type;
|
||||||
public $doc_ref;
|
public $doc_ref;
|
||||||
public $fk_doc;
|
public $fk_doc;
|
||||||
@ -190,14 +190,14 @@ class BookKeeping extends CommonObject
|
|||||||
|
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$row = $this->db->fetch_object($resql);
|
$row = $this->db->fetch_object($resql);
|
||||||
if ($row->nb == 0) {
|
if ($row->nb == 0)
|
||||||
|
{
|
||||||
// Determine piece_num
|
// Determine piece_num
|
||||||
$sqlnum = "SELECT piece_num";
|
$sqlnum = "SELECT piece_num";
|
||||||
$sqlnum .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
$sqlnum .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
||||||
$sqlnum .= " WHERE doc_type = '" . $this->doc_type . "'";
|
$sqlnum .= " WHERE doc_type = '" . $this->doc_type . "'"; // For example doc_type = 'bank'
|
||||||
$sqlnum .= " AND fk_docdet = '" . $this->fk_docdet . "'";
|
$sqlnum .= " AND fk_docdet = '" . $this->fk_docdet . "'"; // fk_docdet is rowid into llx_bank or llx_facturedet or llx_facturefourndet, or ...
|
||||||
$sqlnum .= " AND doc_ref = '" . $this->doc_ref . "'";
|
$sqlnum .= " AND doc_ref = '" . $this->doc_ref . "'"; // ref of source object
|
||||||
$sqlnum .= " AND entity IN (" . getEntity("accountancy", 1) . ")";
|
$sqlnum .= " AND entity IN (" . getEntity("accountancy", 1) . ")";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . ":: create sqlnum=" . $sqlnum, LOG_DEBUG);
|
dol_syslog(get_class($this) . ":: create sqlnum=" . $sqlnum, LOG_DEBUG);
|
||||||
@ -276,13 +276,13 @@ class BookKeeping extends CommonObject
|
|||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$result = 0;
|
$result = 0;
|
||||||
} else {
|
} else {
|
||||||
$result = - 2;
|
$result = -2;
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error Create Error ' . $result . ' lecture ID';
|
$this->errors[] = 'Error Create Error ' . $result . ' lecture ID';
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = - 1;
|
$result = -1;
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
@ -290,11 +290,11 @@ class BookKeeping extends CommonObject
|
|||||||
} else { // Already exists
|
} else { // Already exists
|
||||||
$result = -3;
|
$result = -3;
|
||||||
$error++;
|
$error++;
|
||||||
$this->errors[] = 'Error Transaction for ('.$this->doc_type.', '.$this->doc_ref.', '.$this->fk_docdet.') were already recorded';
|
$this->error='BookkeepingRecordAlreadyExists';
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_WARNING);
|
dol_syslog(__METHOD__ . ' ' . $this->error, LOG_WARNING);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = - 5;
|
$result = -5;
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
@ -316,11 +316,9 @@ class BookKeeping extends CommonObject
|
|||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
return -1 * $error;
|
||||||
return - 1 * $error;
|
|
||||||
} else {
|
} else {
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1163,9 +1161,12 @@ class BookKeeping extends CommonObject
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function initAsSpecimen() {
|
public function initAsSpecimen() {
|
||||||
$this->id = 0;
|
global $user;
|
||||||
|
|
||||||
$this->doc_date = '';
|
$now=dol_now();
|
||||||
|
|
||||||
|
$this->id = 0;
|
||||||
|
$this->doc_date = $now;
|
||||||
$this->doc_type = '';
|
$this->doc_type = '';
|
||||||
$this->doc_ref = '';
|
$this->doc_ref = '';
|
||||||
$this->fk_doc = '';
|
$this->fk_doc = '';
|
||||||
@ -1173,11 +1174,11 @@ class BookKeeping extends CommonObject
|
|||||||
$this->code_tiers = '';
|
$this->code_tiers = '';
|
||||||
$this->numero_compte = '';
|
$this->numero_compte = '';
|
||||||
$this->label_compte = '';
|
$this->label_compte = '';
|
||||||
$this->debit = '';
|
$this->debit = 99.9;
|
||||||
$this->credit = '';
|
$this->credit = '';
|
||||||
$this->montant = '';
|
$this->montant = '';
|
||||||
$this->sens = '';
|
$this->sens = '';
|
||||||
$this->fk_user_author = '';
|
$this->fk_user_author = $user->id;
|
||||||
$this->import_key = '';
|
$this->import_key = '';
|
||||||
$this->code_journal = '';
|
$this->code_journal = '';
|
||||||
$this->piece_num = '';
|
$this->piece_num = '';
|
||||||
|
|||||||
@ -71,8 +71,8 @@ class FormVentilation extends Form
|
|||||||
* @param string $htmlname Name of field in html form
|
* @param string $htmlname Name of field in html form
|
||||||
* @param int $showempty Add an empty field
|
* @param int $showempty Add an empty field
|
||||||
* @param array $event Event options
|
* @param array $event Event options
|
||||||
* @param int $select_in selectid value is a aa.rowid (0 default) or aa.account_number (1)
|
* @param int $select_in 0=selectid value is a aa.rowid (default) or 1=selectid is aa.account_number
|
||||||
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
|
* @param int $select_out Set value returned by select. 0=rowid (default), 1=account_number
|
||||||
* @param string $morecss More css non HTML object
|
* @param string $morecss More css non HTML object
|
||||||
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
|
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
|
||||||
* @return string String with HTML select
|
* @return string String with HTML select
|
||||||
@ -83,10 +83,13 @@ class FormVentilation extends Form
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
|
||||||
|
$out = '';
|
||||||
|
|
||||||
$options = array();
|
$options = array();
|
||||||
if ($usecache && ! empty($this->options_cache[$usecache]))
|
if ($usecache && ! empty($this->options_cache[$usecache]))
|
||||||
{
|
{
|
||||||
$options = $this->options_cache[$usecache];
|
$options = $this->options_cache[$usecache];
|
||||||
|
$selected=$selectid;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -108,7 +111,7 @@ class FormVentilation extends Form
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$out = ajax_combobox($htmlname, $event);
|
$out .= ajax_combobox($htmlname, $event);
|
||||||
|
|
||||||
$selected = 0;
|
$selected = 0;
|
||||||
while ($obj = $this->db->fetch_object($resql))
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
|
|||||||
@ -29,6 +29,7 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||||
|
|
||||||
// Langs
|
// Langs
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
@ -47,7 +48,7 @@ if (! $user->rights->accounting->bind->write)
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
$year = $_GET["year"];
|
$year = GETPOST("year",'int');
|
||||||
if ($year == 0) {
|
if ($year == 0) {
|
||||||
$year_current = strftime("%Y", time());
|
$year_current = strftime("%Y", time());
|
||||||
$year_start = $year_current;
|
$year_start = $year_current;
|
||||||
@ -57,7 +58,7 @@ if ($year == 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate History
|
// Validate History
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action','alpha');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -179,7 +180,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" hr
|
|||||||
$sql = "SELECT count(*) FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
$sql = "SELECT count(*) FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||||
$sql .= " , " . MAIN_DB_PREFIX . "facture as f";
|
$sql .= " , " . MAIN_DB_PREFIX . "facture as f";
|
||||||
$sql .= " WHERE fd.fk_code_ventilation = 0";
|
$sql .= " WHERE fd.fk_code_ventilation = 0";
|
||||||
$sql .= " AND f.rowid = fd.fk_facture AND f.fk_statut = 1;";
|
$sql .= " AND f.rowid = fd.fk_facture";
|
||||||
|
$sql .= " AND f.fk_statut > 0";
|
||||||
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
} else {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
}
|
||||||
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
|
|
||||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -222,6 +230,11 @@ $sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'
|
|||||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND aa.account_number IS NULL";
|
$sql .= " AND aa.account_number IS NULL";
|
||||||
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
} else {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
}
|
||||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||||
@ -273,6 +286,11 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid
|
|||||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
} else {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
}
|
||||||
$sql .= " AND aa.account_number IS NOT NULL";
|
$sql .= " AND aa.account_number IS NOT NULL";
|
||||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
@ -301,97 +319,105 @@ print "</table>\n";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
|
||||||
|
{
|
||||||
|
print '<br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
|
|
||||||
print '<br>';
|
print "<br>\n";
|
||||||
print '<br>';
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
|
}
|
||||||
|
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||||
|
|
||||||
|
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
|
}
|
||||||
|
$sql .= " SUM(fd.total_ht) as total";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||||
|
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
|
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
} else {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
}
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$i = 0;
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
while ($row = $db->fetch_row($resql)) {
|
||||||
|
print '<tr><td>' . $row[0] . '</td>';
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||||
|
}
|
||||||
|
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||||
|
print '</tr>';
|
||||||
|
$i ++;
|
||||||
|
}
|
||||||
|
$db->free($resql);
|
||||||
|
} else {
|
||||||
|
print $db->lasterror(); // Show last sql error
|
||||||
|
}
|
||||||
|
print "</table>\n";
|
||||||
|
|
||||||
print "<br>\n";
|
if (! empty($conf->margin->enabled)) {
|
||||||
print '<table class="noborder" width="100%">';
|
print "<br>\n";
|
||||||
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
|
print '<table class="noborder" width="100%">';
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
|
}
|
||||||
|
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||||
|
|
||||||
|
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
|
}
|
||||||
|
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||||
|
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
|
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
} else {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
while ($row = $db->fetch_row($resql)) {
|
||||||
|
|
||||||
|
print '<tr><td>' . $row[0] . '</td>';
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
print '<td align="right">' . price(price2num($row[$i])) . '</td>';
|
||||||
|
}
|
||||||
|
print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
$db->free($resql);
|
||||||
|
} else {
|
||||||
|
print $db->lasterror(); // Show last sql error
|
||||||
|
}
|
||||||
|
print "</table>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
|
||||||
|
|
||||||
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
|
||||||
}
|
|
||||||
$sql .= " SUM(fd.total_ht) as total";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
|
||||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
|
||||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
|
||||||
|
|
||||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql) {
|
|
||||||
$i = 0;
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
|
|
||||||
while ($row = $db->fetch_row($resql)) {
|
|
||||||
print '<tr><td>' . $row[0] . '</td>';
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
|
||||||
}
|
|
||||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
|
||||||
print '</tr>';
|
|
||||||
$i ++;
|
|
||||||
}
|
|
||||||
$db->free($resql);
|
|
||||||
} else {
|
|
||||||
print $db->lasterror(); // Show last sql error
|
|
||||||
}
|
|
||||||
print "</table>\n";
|
|
||||||
|
|
||||||
if (! empty($conf->margin->enabled)) {
|
|
||||||
print "<br>\n";
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
|
||||||
}
|
|
||||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
|
||||||
|
|
||||||
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
|
||||||
}
|
|
||||||
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
|
||||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
|
||||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
|
||||||
|
|
||||||
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql) {
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
|
|
||||||
while ($row = $db->fetch_row($resql)) {
|
|
||||||
|
|
||||||
print '<tr><td>' . $row[0] . '</td>';
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
print '<td align="right">' . price(price2num($row[$i])) . '</td>';
|
|
||||||
}
|
|
||||||
print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
$db->free($resql);
|
|
||||||
} else {
|
|
||||||
print $db->lasterror(); // Show last sql error
|
|
||||||
}
|
|
||||||
print "</table>\n";
|
|
||||||
}
|
|
||||||
print "</table>\n";
|
|
||||||
print '</td></tr></table>';
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -123,6 +123,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
|
|||||||
$account_parent = ''; // Protection to avoid to mass apply it a second time
|
$account_parent = ''; // Protection to avoid to mass apply it a second time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -199,7 +200,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't sha
|
|||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -252,6 +253,7 @@ if ($result) {
|
|||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -338,18 +340,19 @@ if ($result) {
|
|||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
|
if ($nbtotalofrecords > $limit) {
|
||||||
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->lasterror();
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
|
||||||
|
|
||||||
if ($nbtotalofrecords > $limit) {
|
|
||||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -210,12 +210,17 @@ if (strlen(trim($search_account))) {
|
|||||||
if (strlen(trim($search_vat))) {
|
if (strlen(trim($search_vat))) {
|
||||||
$sql .= natural_search("l.tva_tx",$search_vat,1);
|
$sql .= natural_search("l.tva_tx",$search_vat,1);
|
||||||
}
|
}
|
||||||
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
} else {
|
||||||
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||||
|
}
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
|
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -264,6 +269,7 @@ if ($result) {
|
|||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
@ -400,8 +406,9 @@ if ($result) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
|
|||||||
@ -45,7 +45,7 @@ if (! $user->rights->accounting->bind->write)
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
$year = $_GET["year"];
|
$year = GETPOST('year', 'int');
|
||||||
if ($year == 0) {
|
if ($year == 0) {
|
||||||
$year_current = strftime("%Y", time());
|
$year_current = strftime("%Y", time());
|
||||||
$year_start = $year_current;
|
$year_start = $year_current;
|
||||||
@ -68,9 +68,9 @@ if ($action == 'validatehistory') {
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
// First clean corrupted data
|
// First clean corrupted data
|
||||||
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
|
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sqlclean .= " SET fd.fk_code_ventilation = 0";
|
$sqlclean .= " SET erd.fk_code_ventilation = 0";
|
||||||
$sqlclean .= ' WHERE fd.fk_code_ventilation NOT IN ';
|
$sqlclean .= ' WHERE erd.fk_code_ventilation NOT IN ';
|
||||||
$sqlclean .= ' (SELECT accnt.rowid ';
|
$sqlclean .= ' (SELECT accnt.rowid ';
|
||||||
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
||||||
$sqlclean .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
|
$sqlclean .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
|
||||||
@ -79,18 +79,18 @@ if ($action == 'validatehistory') {
|
|||||||
|
|
||||||
// Now make the binding
|
// Now make the binding
|
||||||
if ($db->type == 'pgsql') {
|
if ($db->type == 'pgsql') {
|
||||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
|
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det";
|
||||||
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
|
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
|
||||||
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
$sql1 .= " FROM " . MAIN_DB_PREFIX . "c_type_fees as t, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||||
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facture_fourn_det.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "expensereport_det.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
||||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
|
$sql1 .= " AND accnt.active = 1 AND t.accountancy_code = accnt.account_number";
|
||||||
$sql1 .= " AND " . MAIN_DB_PREFIX . "facture_fourn_det.fk_code_ventilation = 0";
|
$sql1 .= " AND " . MAIN_DB_PREFIX . "expensereport_det.fk_code_ventilation = 0";
|
||||||
} else {
|
} else {
|
||||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd, " . MAIN_DB_PREFIX . "c_type_fees as t, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||||
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
|
$sql1 .= " SET erd.fk_code_ventilation = accnt.rowid";
|
||||||
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
$sql1 .= " WHERE erd.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
||||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
|
$sql1 .= " AND accnt.active = 1 AND t.accountancy_code=accnt.account_number";
|
||||||
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
$sql1 .= " AND erd.fk_code_ventilation = 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
$resql1 = $db->query($sql1);
|
$resql1 = $db->query($sql1);
|
||||||
@ -106,9 +106,9 @@ if ($action == 'validatehistory') {
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
|
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sql1 .= " SET fd.fk_code_ventilation = 0";
|
$sql1 .= " SET erd.fk_code_ventilation = 0";
|
||||||
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
|
$sql1 .= ' WHERE erd.fk_code_ventilation NOT IN ';
|
||||||
$sql1 .= ' (SELECT accnt.rowid ';
|
$sql1 .= ' (SELECT accnt.rowid ';
|
||||||
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
||||||
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
|
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
|
||||||
@ -129,12 +129,12 @@ if ($action == 'validatehistory') {
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
|
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sql1.= " SET fd.fk_code_ventilation = 0";
|
$sql1.= " SET erd.fk_code_ventilation = 0";
|
||||||
$sql1.= " WHERE fd.fk_facture_fourn IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
|
$sql1.= " WHERE erd.fk_expensereport IN ( SELECT er.rowid FROM " . MAIN_DB_PREFIX . "expensereport as er";
|
||||||
$sql1.= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
|
$sql1.= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
|
||||||
$sql1.= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
|
$sql1.= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
|
||||||
$sql1.= " AND f.entity IN (" . getEntity("accountancy", 1) . ")";
|
$sql1.= " AND er.entity IN (" . getEntity("accountancy", 1) . ")";
|
||||||
$sql1.=")";
|
$sql1.=")";
|
||||||
|
|
||||||
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
|
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
|
||||||
@ -197,16 +197,17 @@ print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></
|
|||||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
|
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
|
||||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
}
|
}
|
||||||
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
|
||||||
$sql .= " WHERE er.date_create >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
$sql .= " AND er.date_create <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
$sql .= " AND er.fk_statut > 0 ";
|
$sql .= " AND er.fk_statut > 0 ";
|
||||||
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
|
||||||
|
$sql .= " AND aa.account_number IS NULL";
|
||||||
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
|
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
|
||||||
@ -250,17 +251,17 @@ print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></
|
|||||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
|
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
|
||||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
}
|
}
|
||||||
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
|
||||||
$sql .= " WHERE er.date_create >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
$sql .= " AND er.date_create <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
$sql .= " AND er.fk_statut > 0 ";
|
$sql .= " AND er.fk_statut > 0 ";
|
||||||
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND aa.account_number IS NULL";
|
$sql .= " AND aa.account_number IS NOT NULL";
|
||||||
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
|
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
|
||||||
@ -289,55 +290,55 @@ print "</table>\n";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<br>';
|
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
|
||||||
print '<br>';
|
{
|
||||||
|
print '<br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
|
|
||||||
|
print "<br>\n";
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
|
}
|
||||||
|
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||||
|
|
||||||
|
$sql = "SELECT '" . $langs->trans("TotalExpenseReport") . "' AS label,";
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
|
}
|
||||||
|
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
||||||
|
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
|
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
|
$sql .= " AND er.fk_statut > 0 ";
|
||||||
|
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
|
||||||
|
|
||||||
|
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
while ( $row = $db->fetch_row($resql)) {
|
||||||
|
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
print '<tr><td>' . $row[0] . '</td>';
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||||
|
}
|
||||||
|
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
|
} else {
|
||||||
print "<br>\n";
|
print $db->lasterror(); // Show last sql error
|
||||||
print '<table class="noborder" width="100%">';
|
}
|
||||||
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
|
print "</table>\n";
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
|
||||||
}
|
}
|
||||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
|
||||||
|
|
||||||
$sql = "SELECT '" . $langs->trans("TotalExpenseReport") . "' AS label,";
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
|
||||||
}
|
|
||||||
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
|
||||||
$sql .= " WHERE er.date_create >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
|
||||||
$sql .= " AND er.date_create <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
|
||||||
$sql .= " AND er.fk_statut > 0 ";
|
|
||||||
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
|
|
||||||
|
|
||||||
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql) {
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
|
|
||||||
while ( $row = $db->fetch_row($resql)) {
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>' . $row[0] . '</td>';
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
|
||||||
}
|
|
||||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->free($resql);
|
|
||||||
} else {
|
|
||||||
print $db->lasterror(); // Show last sql error
|
|
||||||
}
|
|
||||||
print "</table>\n";
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -178,7 +178,7 @@ $sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don'
|
|||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -230,6 +230,7 @@ if ($result) {
|
|||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -304,18 +305,19 @@ if ($result) {
|
|||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
|
if ($nbtotalofrecords > $limit) {
|
||||||
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
|
||||||
|
|
||||||
if ($nbtotalofrecords > $limit) {
|
|
||||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -208,7 +208,7 @@ $sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don'
|
|||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -257,6 +257,7 @@ if ($result) {
|
|||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
@ -352,6 +353,8 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -36,9 +37,6 @@ $langs->load("accountancy");
|
|||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Validate History
|
|
||||||
$action = GETPOST('action');
|
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("dict");
|
$langs->load("dict");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
@ -73,11 +71,11 @@ print "<br>\n";
|
|||||||
|
|
||||||
// STEPS
|
// STEPS
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Pcg_version").'</strong>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Pcg_version").'</strong>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
@ -86,16 +84,16 @@ print "<br>\n";
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescMisc", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>')."<br>\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescMisc", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>')."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step++;
|
$step++;
|
||||||
$textlink = '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>';
|
$textlink = '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>';
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
if (! empty($conf->tax->enabled))
|
if (! empty($conf->tax->enabled))
|
||||||
{
|
{
|
||||||
$textlink = '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>';
|
$textlink = '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>';
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
@ -104,7 +102,7 @@ if (! empty($conf->tax->enabled))
|
|||||||
/*if (! empty($conf->salaries->enabled))
|
/*if (! empty($conf->salaries->enabled))
|
||||||
{
|
{
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||||
// htdocs/admin/salaries.php
|
// htdocs/admin/salaries.php
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
@ -112,14 +110,14 @@ if (! empty($conf->tax->enabled))
|
|||||||
if (! empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
|
if (! empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
|
||||||
{
|
{
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
}
|
}
|
||||||
if (! empty($conf->loan->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
|
if (! empty($conf->loan->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
|
||||||
{
|
{
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuLoanAccounts").'</strong>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").'-'.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
}
|
}
|
||||||
@ -127,7 +125,7 @@ if (! empty($conf->loan->enabled)) // TODO Move this in the default account pag
|
|||||||
if (! empty($conf->don->enabled))
|
if (! empty($conf->don->enabled))
|
||||||
{
|
{
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDonationAccounts").'</strong>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDonationAccounts").'</strong>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
}*/
|
}*/
|
||||||
@ -138,7 +136,7 @@ print "<br>\n";
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>')."<br>\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>')."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
@ -148,14 +146,21 @@ print "<br>\n";
|
|||||||
$step = 0;
|
$step = 0;
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescCustomer", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."<br>\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescCustomer", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSupplier", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."<br>\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSupplier", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."<br>\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>')."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", $step)."<br>\n";
|
||||||
|
print "<br>\n";
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", $step)."<br>\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", $step)."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|||||||
@ -153,7 +153,8 @@ if ($result) {
|
|||||||
// one line for bank jounral = tabbq
|
// one line for bank jounral = tabbq
|
||||||
// one line for thirdparty journal = tabtp
|
// one line for thirdparty journal = tabtp
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ( $i < $num ) {
|
while ( $i < $num )
|
||||||
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
// Set accountancy code (for bank and thirdparty)
|
// Set accountancy code (for bank and thirdparty)
|
||||||
@ -314,7 +315,8 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
if (! $errorforline)
|
if (! $errorforline)
|
||||||
{
|
{
|
||||||
// Line into bank account
|
// Line into bank account
|
||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ( $tabbq[$key] as $k => $mt )
|
||||||
|
{
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["ref"];
|
||||||
@ -363,9 +365,18 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
|
|
||||||
$result = $bookkeeping->create($user);
|
$result = $bookkeeping->create($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++;
|
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
|
||||||
$errorforline++;
|
{
|
||||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
$error++;
|
||||||
|
$errorforline++;
|
||||||
|
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
$errorforline++;
|
||||||
|
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -463,16 +474,6 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* View
|
|
||||||
*/
|
|
||||||
|
|
||||||
$form = new Form($db);
|
|
||||||
|
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'export_csv') {
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
@ -633,6 +634,15 @@ if ($action == 'export_csv') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
if (empty($action) || $action == 'view') {
|
if (empty($action) || $action == 'view') {
|
||||||
$invoicestatic = new Facture($db);
|
$invoicestatic = new Facture($db);
|
||||||
$invoicesupplierstatic = new FactureFournisseur($db);
|
$invoicesupplierstatic = new FactureFournisseur($db);
|
||||||
@ -689,7 +699,8 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||||
print "<td>" . $langs->trans("Type") . "</td>";
|
print "<td>" . $langs->trans("Type") . "</td>";
|
||||||
print "<td>" . $langs->trans("PaymentMode") . "</td>";
|
print "<td>" . $langs->trans("PaymentMode") . "</td>";
|
||||||
print "<td align='right'>" . $langs->trans("Debit") . "</td><td align='right'>" . $langs->trans("Credit") . "</td>";
|
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
||||||
|
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var = true;
|
$var = true;
|
||||||
@ -721,7 +732,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$sqlmid = 'SELECT payfac.fk_facture as id';
|
$sqlmid = 'SELECT payfac.fk_facture as id';
|
||||||
$sqlmid .= " FROM ".MAIN_DB_PREFIX."paiement_facture as payfac";
|
$sqlmid .= " FROM ".MAIN_DB_PREFIX."paiement_facture as payfac";
|
||||||
$sqlmid .= " WHERE payfac.fk_paiement=" . $val["paymentid"];
|
$sqlmid .= " WHERE payfac.fk_paiement=" . $val["paymentid"];
|
||||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||||
$resultmid = $db->query($sqlmid);
|
$resultmid = $db->query($sqlmid);
|
||||||
if ($resultmid) {
|
if ($resultmid) {
|
||||||
$objmid = $db->fetch_object($resultmid);
|
$objmid = $db->fetch_object($resultmid);
|
||||||
@ -735,7 +746,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$sqlmid = 'SELECT payfac.fk_facturefourn as id';
|
$sqlmid = 'SELECT payfac.fk_facturefourn as id';
|
||||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfac";
|
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfac";
|
||||||
$sqlmid .= " WHERE payfac.fk_paiementfourn=" . $val["paymentsupplierid"];
|
$sqlmid .= " WHERE payfac.fk_paiementfourn=" . $val["paymentsupplierid"];
|
||||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||||
$resultmid = $db->query($sqlmid);
|
$resultmid = $db->query($sqlmid);
|
||||||
if ($resultmid) {
|
if ($resultmid) {
|
||||||
$objmid = $db->fetch_object($resultmid);
|
$objmid = $db->fetch_object($resultmid);
|
||||||
@ -750,8 +761,8 @@ if (empty($action) || $action == 'view') {
|
|||||||
$invoicestatic->ref = $val["ref"];
|
$invoicestatic->ref = $val["ref"];
|
||||||
$invoicestatic->type = $val["type"];*/
|
$invoicestatic->type = $val["type"];*/
|
||||||
// Bank
|
// Bank
|
||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ( $tabbq[$key] as $k => $mt )
|
||||||
|
{
|
||||||
print "<tr " . $bc[$var] . ">";
|
print "<tr " . $bc[$var] . ">";
|
||||||
print "<td><!-- Bank bank.rowid=".$key."--></td>";
|
print "<td><!-- Bank bank.rowid=".$key."--></td>";
|
||||||
print "<td>" . $date . "</td>";
|
print "<td>" . $date . "</td>";
|
||||||
@ -809,7 +820,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("WaitAccountNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("WaitAccountNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
else print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) .
|
else print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "<td>" . $reflabel . "</td>";
|
print "<td>" . $reflabel . "</td>";
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
|
|||||||
@ -187,11 +187,11 @@ if ($action == 'writebookkeeping') {
|
|||||||
// Fees
|
// Fees
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
if ($accountingaccount->fetch(null, $k)) {
|
if ($accountingaccount->fetch(null, $k, true)) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["ref"];
|
||||||
@ -355,7 +355,7 @@ if ($action == 'export_csv') {
|
|||||||
// Fees
|
// Fees
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
@ -464,7 +464,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
// Fees
|
// Fees
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
|
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print "<tr " . $bc[$var] . " >";
|
print "<tr " . $bc[$var] . " >";
|
||||||
|
|||||||
@ -219,11 +219,11 @@ if ($action == 'writebookkeeping') {
|
|||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
if ($accountingaccount->fetch(null, $k)) {
|
if ($accountingaccount->fetch(null, $k, true)) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["ref"];
|
||||||
@ -398,7 +398,7 @@ if ($action == 'export_csv') {
|
|||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
@ -518,7 +518,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
|
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print "<tr " . $bc[$var] . " >";
|
print "<tr " . $bc[$var] . " >";
|
||||||
|
|||||||
@ -243,7 +243,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
if ($mt) {
|
if ($mt) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
if ($accountingaccount->fetch(null, $k)) {
|
if ($accountingaccount->fetch(null, $k, true)) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["ref"];
|
||||||
@ -375,7 +375,7 @@ if ($action == 'export_csv') {
|
|||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount_static = new AccountingAccount($db);
|
$accountingaccount_static = new AccountingAccount($db);
|
||||||
if ($accountingaccount_static->fetch(null, $k)) {
|
if ($accountingaccount_static->fetch(null, $k, true)) {
|
||||||
print $date . $sep;
|
print $date . $sep;
|
||||||
print $sell_journal . $sep;
|
print $sell_journal . $sep;
|
||||||
print length_accountg(html_entity_decode($k)) . $sep;
|
print length_accountg(html_entity_decode($k)) . $sep;
|
||||||
@ -429,7 +429,7 @@ if ($action == 'export_csv') {
|
|||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
|
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
@ -559,7 +559,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
|
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print "<tr " . $bc[$var] . ">";
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $rowid = GETPOST('rowid', 'int');
|
|||||||
$cancel = GETPOST('cancel');
|
$cancel = GETPOST('cancel');
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
$year = $_GET["year"];
|
$year = GETPOST('year','int');
|
||||||
if ($year == 0) {
|
if ($year == 0) {
|
||||||
$year_current = strftime("%Y", time());
|
$year_current = strftime("%Y", time());
|
||||||
$year_start = $year_current;
|
$year_start = $year_current;
|
||||||
@ -64,9 +64,11 @@ if (! $user->rights->accounting->comptarapport->lire)
|
|||||||
|
|
||||||
$AccCat = new AccountancyCategory($db);
|
$AccCat = new AccountancyCategory($db);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxheader('', $langs->trans('ReportInOut'));
|
llxheader('', $langs->trans('ReportInOut'));
|
||||||
|
|
||||||
$formaccounting = new FormAccounting($db);
|
$formaccounting = new FormAccounting($db);
|
||||||
@ -75,9 +77,12 @@ $form = new Form($db);
|
|||||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||||
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans('ReportInOut') . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy');
|
print load_fiche_titre($langs->trans('ReportInOut'), $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, 'title_accountancy');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
$moreforfilter='';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
$months = array( $langs->trans("JanuaryMin"),
|
$months = array( $langs->trans("JanuaryMin"),
|
||||||
$langs->trans("FebruaryMin"),
|
$langs->trans("FebruaryMin"),
|
||||||
@ -93,7 +98,8 @@ $months = array( $langs->trans("JanuaryMin"),
|
|||||||
$langs->trans("DecemberMin"),
|
$langs->trans("DecemberMin"),
|
||||||
);
|
);
|
||||||
|
|
||||||
print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans("Account").'</th>';
|
print '<tr class="liste_titre">';
|
||||||
|
print '<th class="liste_titre">'.$langs->trans("Account").'</th>';
|
||||||
print '<th class="liste_titre">'.$langs->trans("Description").'</th>';
|
print '<th class="liste_titre">'.$langs->trans("Description").'</th>';
|
||||||
print '<th class="liste_titre" align="center">N-1</th>';
|
print '<th class="liste_titre" align="center">N-1</th>';
|
||||||
print '<th class="liste_titre" align="center">'.$langs->trans("NReal").'</th>';
|
print '<th class="liste_titre" align="center">'.$langs->trans("NReal").'</th>';
|
||||||
@ -257,6 +263,7 @@ if (!empty($cats))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
@ -45,7 +45,7 @@ if (! $user->rights->accounting->bind->write)
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
$year = $_GET["year"];
|
$year = GETPOST("year",'int');
|
||||||
if ($year == 0) {
|
if ($year == 0) {
|
||||||
$year_current = strftime("%Y", time());
|
$year_current = strftime("%Y", time());
|
||||||
$year_start = $year_current;
|
$year_start = $year_current;
|
||||||
@ -55,7 +55,7 @@ if ($year == 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate History
|
// Validate History
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -289,58 +289,56 @@ print "</table>\n";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
|
||||||
|
{
|
||||||
|
print '<br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
print '<br>';
|
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
print '<br>';
|
|
||||||
|
print "<br>\n";
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
|
}
|
||||||
|
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||||
|
|
||||||
|
$sql = "SELECT '" . $langs->trans("CAHTF") . "' AS label,";
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
|
}
|
||||||
|
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
||||||
|
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
|
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
|
$sql .= " AND ff.fk_statut > 0 ";
|
||||||
|
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
|
||||||
|
|
||||||
|
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
while ( $row = $db->fetch_row($resql)) {
|
||||||
|
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
print '<tr><td>' . $row[0] . '</td>';
|
||||||
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
|
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||||
|
}
|
||||||
|
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
|
} else {
|
||||||
|
print $db->lasterror(); // Show last sql error
|
||||||
|
}
|
||||||
print "<br>\n";
|
print "</table>\n";
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
|
||||||
}
|
}
|
||||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
|
||||||
|
|
||||||
$sql = "SELECT '" . $langs->trans("CAHTF") . "' AS label,";
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
|
||||||
}
|
|
||||||
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
|
||||||
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
|
||||||
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
|
||||||
$sql .= " AND ff.fk_statut > 0 ";
|
|
||||||
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
|
|
||||||
|
|
||||||
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql) {
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
|
|
||||||
while ( $row = $db->fetch_row($resql)) {
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>' . $row[0] . '</td>';
|
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
|
||||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
|
||||||
}
|
|
||||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->free($resql);
|
|
||||||
} else {
|
|
||||||
print $db->lasterror(); // Show last sql error
|
|
||||||
}
|
|
||||||
print "</table>\n";
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -182,7 +182,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't
|
|||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -236,6 +236,7 @@ if ($result) {
|
|||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -324,17 +325,18 @@ if ($result) {
|
|||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
|
print "</table>";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
|
if ($nbtotalofrecords > $limit) {
|
||||||
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
|
||||||
|
|
||||||
if ($nbtotalofrecords > $limit) {
|
|
||||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -217,7 +217,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't
|
|||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -266,7 +266,8 @@ if ($result) {
|
|||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<div class="div-table-responsive">';
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
@ -414,6 +415,8 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
|
|||||||
@ -108,7 +108,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><?php echo $langs->trans("Note"); ?></td>
|
<td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
|
||||||
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
|
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -117,7 +117,7 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><?php echo $langs->trans("Note"); ?></td>
|
<td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
|
||||||
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
|
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -102,7 +102,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><?php echo $langs->trans("Note"); ?></td>
|
<td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -822,7 +822,7 @@ else
|
|||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="member_login" size="40" value="'.(isset($_POST["member_login"])?$_POST["member_login"]:$object->login).'"></td></tr>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="member_login" class="maxwidth200" value="'.(isset($_POST["member_login"])?GETPOST("member_login", 'alpha', 2):$object->login).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
@ -873,7 +873,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOST('address','alpha')?GETPOST('address','alpha'):$object->address).'</textarea>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOST('address','alpha')?GETPOST('address','alpha'):$object->address).'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -1066,7 +1066,7 @@ else
|
|||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td colspan="2"><input type="text" name="login" size="30" value="'.(isset($_POST["login"])?$_POST["login"]:$object->login).'"></td></tr>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td colspan="2"><input type="text" name="login" class="maxwidth200" value="'.(isset($_POST["login"])?GETPOST("login",'alpha',2):$object->login).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Morphy
|
// Morphy
|
||||||
@ -1090,7 +1090,7 @@ else
|
|||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(isset($_POST["societe"])?$_POST["societe"]:$object->societe).'"></td></tr>';
|
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(isset($_POST["societe"])?GETPOST("societe",'',2):$object->societe).'"></td></tr>';
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||||
@ -1099,11 +1099,11 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Lastname
|
// Lastname
|
||||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.(isset($_POST["lastname"])?$_POST["lastname"]:$object->lastname).'"></td>';
|
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.(isset($_POST["lastname"])?GETPOST("lastname",'',2):$object->lastname).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Firstname
|
// Firstname
|
||||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td>';
|
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(isset($_POST["firstname"])?GETPOST("firstname",'',3):$object->firstname).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Photo
|
// Photo
|
||||||
@ -1122,24 +1122,24 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// EMail
|
// EMail
|
||||||
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="email" size="40" value="'.(isset($_POST["email"])?$_POST["email"]:$object->email).'"></td></tr>';
|
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="email" size="40" value="'.(isset($_POST["email"])?GETPOST("email",'',2):$object->email).'"></td></tr>';
|
||||||
|
|
||||||
// Password
|
// Password
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" size="30" value="'.(isset($_POST["pass"])?$_POST["pass"]:$object->pass).'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="maxwdith200" value="'.(isset($_POST["pass"])?GETPOST("pass",'',2):$object->pass).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(isset($_POST["address"])?GETPOST("address",'',2):$object->address).'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||||
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6);
|
print $formcompany->select_ziptown((isset($_POST["zipcode"])?GETPOST("zipcode",'',2):$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6);
|
||||||
print ' ';
|
print ' ';
|
||||||
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
print $formcompany->select_ziptown((isset($_POST["town"])?GETPOST("town",'',2):$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
@ -1153,23 +1153,23 @@ else
|
|||||||
if (empty($conf->global->MEMBER_DISABLE_STATE))
|
if (empty($conf->global->MEMBER_DISABLE_STATE))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||||
print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id);
|
print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?GETPOST("country_id"):$object->country_id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pro phone
|
// Pro phone
|
||||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"])?$_POST["phone"]:$object->phone).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"])?GETPOST("phone"):$object->phone).'"></td></tr>';
|
||||||
|
|
||||||
// Personal phone
|
// Personal phone
|
||||||
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$object->phone_perso).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"])?GETPOST("phone_perso"):$object->phone_perso).'"></td></tr>';
|
||||||
|
|
||||||
// Mobile phone
|
// Mobile phone
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?GETPOST("phone_mobile"):$object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled))
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?GETPOST("skype"):$object->skype).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
@ -1179,7 +1179,7 @@ else
|
|||||||
|
|
||||||
// Public profil
|
// Public profil
|
||||||
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
||||||
print $form->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1);
|
print $form->selectyesno("public",(isset($_POST["public"])?GETPOST("public",'',2):$object->public),1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
|
|||||||
@ -83,6 +83,9 @@ class Adherent extends CommonObject
|
|||||||
var $datevalid;
|
var $datevalid;
|
||||||
var $birth;
|
var $birth;
|
||||||
|
|
||||||
|
var $note_public;
|
||||||
|
var $note_private;
|
||||||
|
|
||||||
var $typeid; // Id type adherent
|
var $typeid; // Id type adherent
|
||||||
var $type; // Libelle type adherent
|
var $type; // Libelle type adherent
|
||||||
var $need_subscription;
|
var $need_subscription;
|
||||||
@ -410,7 +413,9 @@ class Adherent extends CommonObject
|
|||||||
$this->country_id=($this->country_id > 0?$this->country_id:$this->country_id);
|
$this->country_id=($this->country_id > 0?$this->country_id:$this->country_id);
|
||||||
$this->state_id=($this->state_id > 0?$this->state_id:$this->state_id);
|
$this->state_id=($this->state_id > 0?$this->state_id:$this->state_id);
|
||||||
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords(trim($this->lastname));
|
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords(trim($this->lastname));
|
||||||
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords(trim($this->firstname));
|
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords(trim($this->firstname));
|
||||||
|
$this->note_public=($this->note_public?$this->note_public:$this->note_public);
|
||||||
|
$this->note_private=($this->note_private?$this->note_private:$this->note_private);
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! empty($conf->global->ADHERENT_MAIL_REQUIRED) && ! isValidEMail($this->email))
|
if (! empty($conf->global->ADHERENT_MAIL_REQUIRED) && ! isValidEMail($this->email))
|
||||||
@ -440,7 +445,7 @@ class Adherent extends CommonObject
|
|||||||
$sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
|
$sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
|
||||||
$sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null");
|
$sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null");
|
||||||
$sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
$sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
||||||
$sql.= ", note_public=" .($this->note_private?"'".$this->db->escape($this->note_public)."'":"null");
|
$sql.= ", note_public=" .($this->note_public?"'".$this->db->escape($this->note_public)."'":"null");
|
||||||
$sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null");
|
$sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null");
|
||||||
$sql.= ", public='".$this->public."'";
|
$sql.= ", public='".$this->public."'";
|
||||||
$sql.= ", statut=" .$this->statut;
|
$sql.= ", statut=" .$this->statut;
|
||||||
@ -1146,11 +1151,11 @@ class Adherent extends CommonObject
|
|||||||
$this->birth = $this->db->jdate($obj->birthday);
|
$this->birth = $this->db->jdate($obj->birthday);
|
||||||
|
|
||||||
$this->note_private = $obj->note_private;
|
$this->note_private = $obj->note_private;
|
||||||
$this->note_public = $obj->note_public;
|
$this->note_public = $obj->note_public;
|
||||||
$this->morphy = $obj->morphy;
|
$this->morphy = $obj->morphy;
|
||||||
|
|
||||||
$this->typeid = $obj->fk_adherent_type;
|
$this->typeid = $obj->fk_adherent_type;
|
||||||
$this->type = $obj->type;
|
$this->type = $obj->type;
|
||||||
$this->need_subscription = $obj->subscription;
|
$this->need_subscription = $obj->subscription;
|
||||||
|
|
||||||
$this->user_id = $obj->user_id;
|
$this->user_id = $obj->user_id;
|
||||||
@ -1813,18 +1818,16 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
// Positionne le modele sur le nom du modele a utiliser
|
if (! dol_strlen($modele)) {
|
||||||
if (! dol_strlen($modele))
|
|
||||||
{
|
$modele = 'standard';
|
||||||
if (! empty($conf->global->ADHERENT_ADDON_PDF))
|
|
||||||
{
|
if ($this->modelpdf) {
|
||||||
$modele = $conf->global->ADHERENT_ADDON_PDF;
|
$modele = $this->modelpdf;
|
||||||
}
|
} elseif (! empty($conf->global->ADHERENT_ADDON_PDF)) {
|
||||||
else
|
$modele = $conf->global->ADHERENT_ADDON_PDF;
|
||||||
{
|
}
|
||||||
$modele = 'standard';
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$modelpath = "core/modules/member/doc/";
|
$modelpath = "core/modules/member/doc/";
|
||||||
|
|
||||||
|
|||||||
@ -35,9 +35,10 @@ class AdherentType extends CommonObject
|
|||||||
{
|
{
|
||||||
public $table_element = 'adherent_type';
|
public $table_element = 'adherent_type';
|
||||||
public $element = 'adherent_type';
|
public $element = 'adherent_type';
|
||||||
|
public $picto = 'group';
|
||||||
|
|
||||||
/** @var string Label */
|
/** @var string Label */
|
||||||
public $libelle;
|
public $label;
|
||||||
/**
|
/**
|
||||||
* @var bool
|
* @var bool
|
||||||
* @deprecated Use subscription
|
* @deprecated Use subscription
|
||||||
@ -199,7 +200,7 @@ class AdherentType extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch($rowid)
|
function fetch($rowid)
|
||||||
{
|
{
|
||||||
$sql = "SELECT d.rowid, d.libelle, d.statut, d.subscription, d.mail_valid, d.note, d.vote";
|
$sql = "SELECT d.rowid, d.libelle as label, d.statut, d.subscription, d.mail_valid, d.note, d.vote";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||||
$sql .= " WHERE d.rowid = ".$rowid;
|
$sql .= " WHERE d.rowid = ".$rowid;
|
||||||
|
|
||||||
@ -214,7 +215,8 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
$this->id = $obj->rowid;
|
$this->id = $obj->rowid;
|
||||||
$this->ref = $obj->rowid;
|
$this->ref = $obj->rowid;
|
||||||
$this->libelle = $obj->libelle;
|
$this->label = $obj->label;
|
||||||
|
$this->libelle = $obj->label; // For backward compatibility
|
||||||
$this->statut = $obj->statut;
|
$this->statut = $obj->statut;
|
||||||
$this->subscription = $obj->subscription;
|
$this->subscription = $obj->subscription;
|
||||||
$this->mail_valid = $obj->mail_valid;
|
$this->mail_valid = $obj->mail_valid;
|
||||||
@ -296,6 +298,16 @@ class AdherentType extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getLibStatut
|
||||||
|
*
|
||||||
|
* @return string Return status of a type of member
|
||||||
|
*/
|
||||||
|
function getLibStatut()
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getMailOnValid
|
* getMailOnValid
|
||||||
*
|
*
|
||||||
|
|||||||
@ -143,7 +143,7 @@ class Members extends DolibarrApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new RestException(503, 'Error when retrieve member list : '.$member->error);
|
throw new RestException(503, 'Error when retrieve member list : '.$db->lasterror());
|
||||||
}
|
}
|
||||||
if( ! count($obj_ret)) {
|
if( ! count($obj_ret)) {
|
||||||
throw new RestException(404, 'No member found');
|
throw new RestException(404, 'No member found');
|
||||||
@ -170,8 +170,8 @@ class Members extends DolibarrApi
|
|||||||
foreach($request_data as $field => $value) {
|
foreach($request_data as $field => $value) {
|
||||||
$member->$field = $value;
|
$member->$field = $value;
|
||||||
}
|
}
|
||||||
if($member->create(DolibarrApiAccess::$user) < 0) {
|
if ($member->create(DolibarrApiAccess::$user) < 0) {
|
||||||
throw new RestException(503, 'Error when create member : '.$member->error);
|
throw new RestException(500, 'Error creating member', array_merge(array($member->error), $member->errors));
|
||||||
}
|
}
|
||||||
return $member->id;
|
return $member->id;
|
||||||
}
|
}
|
||||||
@ -200,6 +200,7 @@ class Members extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($request_data as $field => $value) {
|
foreach($request_data as $field => $value) {
|
||||||
|
if ($field == 'id') continue;
|
||||||
// Process the status separately because it must be updated using
|
// Process the status separately because it must be updated using
|
||||||
// the validate() and resiliate() methods of the class Adherent.
|
// the validate() and resiliate() methods of the class Adherent.
|
||||||
if ($field == 'statut') {
|
if ($field == 'statut') {
|
||||||
@ -288,9 +289,6 @@ 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
|
||||||
*
|
|
||||||
* @todo use an array for properties to clean
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function _cleanObjectDatas($object) {
|
function _cleanObjectDatas($object) {
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,7 @@ class Subscriptions extends DolibarrApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new RestException(503, 'Error when retrieve subscription list : '.$subscription->error);
|
throw new RestException(503, 'Error when retrieve subscription list : '.$db->lasterror());
|
||||||
}
|
}
|
||||||
if( ! count($obj_ret)) {
|
if( ! count($obj_ret)) {
|
||||||
throw new RestException(404, 'No Subscription found');
|
throw new RestException(404, 'No Subscription found');
|
||||||
@ -162,8 +162,8 @@ class Subscriptions extends DolibarrApi
|
|||||||
foreach($request_data as $field => $value) {
|
foreach($request_data as $field => $value) {
|
||||||
$subscription->$field = $value;
|
$subscription->$field = $value;
|
||||||
}
|
}
|
||||||
if($subscription->create(DolibarrApiAccess::$user) < 0) {
|
if ($subscription->create(DolibarrApiAccess::$user) < 0) {
|
||||||
throw new RestException(503, 'Error when create subscription : '.$subscription->error);
|
throw new RestException(500, 'Error when creating subscription', array_merge(array($subscription->error), $subscription->errors));
|
||||||
}
|
}
|
||||||
return $subscription->id;
|
return $subscription->id;
|
||||||
}
|
}
|
||||||
@ -188,6 +188,7 @@ class Subscriptions extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($request_data as $field => $value) {
|
foreach($request_data as $field => $value) {
|
||||||
|
if ($field == 'id') continue;
|
||||||
$subscription->$field = $value;
|
$subscription->$field = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,7 @@ class Subscription extends CommonObject
|
|||||||
{
|
{
|
||||||
public $element='subscription';
|
public $element='subscription';
|
||||||
public $table_element='subscription';
|
public $table_element='subscription';
|
||||||
|
public $picto='payment';
|
||||||
|
|
||||||
var $datec; // Date creation
|
var $datec; // Date creation
|
||||||
var $datem; // Date modification
|
var $datem; // Date modification
|
||||||
@ -277,6 +278,30 @@ class Subscription extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourne le libelle du statut d'une adhesion
|
||||||
|
*
|
||||||
|
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||||
|
* @return string Label
|
||||||
|
*/
|
||||||
|
function getLibStatut($mode=0)
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renvoi le libelle d'un statut donne
|
||||||
|
*
|
||||||
|
* @param int $statut Id statut
|
||||||
|
* @return string Label
|
||||||
|
*/
|
||||||
|
function LibStatut($statut)
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
$langs->load("members");
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load information of the subscription object
|
* Load information of the subscription object
|
||||||
*
|
*
|
||||||
|
|||||||
@ -250,7 +250,7 @@ $sql.=$hookmanager->resPrint;
|
|||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
// Count total nb of records with no order and no limits
|
// Count total nb of records with no order and no limits
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -375,6 +375,7 @@ if (! empty($moreforfilter))
|
|||||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
||||||
@ -394,8 +395,8 @@ if (! empty($arrayfields['d.town']['checked'])) print_liste_field_titr
|
|||||||
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.phone']['checked'])) print_liste_field_titre($arrayfields['d.phone']['label'],$_SERVER["PHP_SELF"],'d.phone','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.phone']['checked'])) print_liste_field_titre($arrayfields['d.phone']['label'],$_SERVER["PHP_SELF"],'d.phone','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.phone_perso']['checked'])) print_liste_field_titre($arrayfields['d.phone_perso']['label'],$_SERVER["PHP_SELF"],'d.phone_perso','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.phone_perso']['checked'])) print_liste_field_titre($arrayfields['d.phone_perso']['label'],$_SERVER["PHP_SELF"],'d.phone_perso','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['d.phone_mobile']['label'],$_SERVER["PHP_SELF"],'d.phone_mobile','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['d.phone_mobile']['label'],$_SERVER["PHP_SELF"],'d.phone_mobile','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.email']['checked'])) print_liste_field_titre($arrayfields['d.email']['label'],$_SERVER["PHP_SELF"],'d.email','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.email']['checked'])) print_liste_field_titre($arrayfields['d.email']['label'],$_SERVER["PHP_SELF"],'d.email','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['d.datefin']['checked'])) print_liste_field_titre($arrayfields['d.datefin']['label'],$_SERVER["PHP_SELF"],'d.datefin','',$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($arrayfields['d.datefin']['checked'])) print_liste_field_titre($arrayfields['d.datefin']['label'],$_SERVER["PHP_SELF"],'d.datefin','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
@ -433,32 +434,32 @@ if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
|||||||
if (! empty($arrayfields['d.ref']['checked']))
|
if (! empty($arrayfields['d.ref']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.$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.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" type="text" name="search_firstname" value="'.$search_firstname.'" size="6"></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" type="text" name="search_lastname" value="'.$search_lastname.'" size="6"></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" type="text" name="search_company" value="'.$search_company.'" size="6"></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" type="text" name="search_login" value="'.$search_login.'" size="6"></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']))
|
||||||
@ -478,24 +479,24 @@ if (! empty($arrayfields['t.libelle']['checked']))
|
|||||||
if (! empty($arrayfields['d.address']['checked']))
|
if (! empty($arrayfields['d.address']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_address" value="'.$search_address.'" size="5"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_address" value="'.$search_address.'"></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['d.zip']['checked']))
|
if (! empty($arrayfields['d.zip']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_zip" value="'.$search_zip.'" size="5"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_zip" value="'.$search_zip.'"></td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['d.town']['checked']))
|
if (! empty($arrayfields['d.town']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_town" value="'.$search_town.'" size="5"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_town" value="'.$search_town.'"></td>';
|
||||||
}
|
}
|
||||||
// State
|
// State
|
||||||
if (! empty($arrayfields['state.nom']['checked']))
|
if (! empty($arrayfields['state.nom']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat searchstring" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
|
print '<input class="flat searchstring maxwidth50" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Country
|
// Country
|
||||||
@ -509,25 +510,25 @@ if (! empty($arrayfields['country.code_iso']['checked']))
|
|||||||
if (! empty($arrayfields['d.phone']['checked']))
|
if (! empty($arrayfields['d.phone']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_phone" value="'.$search_phone.'" size="5"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_phone" value="'.$search_phone.'"></td>';
|
||||||
}
|
}
|
||||||
// Phone perso
|
// Phone perso
|
||||||
if (! empty($arrayfields['d.phone_perso']['checked']))
|
if (! empty($arrayfields['d.phone_perso']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_phone_perso" value="'.$search_phone_perso.'" size="5"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_phone_perso" value="'.$search_phone_perso.'"></td>';
|
||||||
}
|
}
|
||||||
// Phone mobile
|
// Phone mobile
|
||||||
if (! empty($arrayfields['d.phone_mobile']['checked']))
|
if (! empty($arrayfields['d.phone_mobile']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_phone_mobile" value="'.$search_phone_mobile.'" size="5"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_phone_mobile" value="'.$search_phone_mobile.'"></td>';
|
||||||
}
|
}
|
||||||
// Email
|
// Email
|
||||||
if (! empty($arrayfields['d.email']['checked']))
|
if (! empty($arrayfields['d.email']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_email" value="'.$search_email.'" size="5"></td>';
|
print '<input class="flat maxwidth50" type="text" name="search_email" value="'.$search_email.'"></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['d.datefin']['checked']))
|
if (! empty($arrayfields['d.datefin']['checked']))
|
||||||
@ -596,7 +597,7 @@ print "</tr>\n";
|
|||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num && $i < $conf->liste_limit)
|
while ($i < min($num, $limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
@ -842,6 +843,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
print "</div>";
|
||||||
print '</form>';
|
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);
|
||||||
|
|||||||
@ -792,7 +792,7 @@ if ($rowid > 0)
|
|||||||
$sql.= " c.datef,";
|
$sql.= " c.datef,";
|
||||||
$sql.= " c.fk_bank,";
|
$sql.= " c.fk_bank,";
|
||||||
$sql.= " b.rowid as bid,";
|
$sql.= " b.rowid as bid,";
|
||||||
$sql.= " ba.rowid as baid, ba.label, ba.bank";
|
$sql.= " ba.rowid as baid, ba.label, ba.bank, ba.ref, ba.account_number, ba.accountancy_journal, ba.number";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank = b.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank = b.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
|
||||||
@ -807,7 +807,7 @@ if ($rowid > 0)
|
|||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
print '<table class="noborder" width="100%">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Ref").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td>';
|
||||||
@ -841,6 +841,10 @@ if ($rowid > 0)
|
|||||||
{
|
{
|
||||||
$accountstatic->label=$objp->label;
|
$accountstatic->label=$objp->label;
|
||||||
$accountstatic->id=$objp->baid;
|
$accountstatic->id=$objp->baid;
|
||||||
|
$accountstatic->number=$objp->number;
|
||||||
|
$accountstatic->account_number=$objp->account_number;
|
||||||
|
$accountstatic->accountancy_journal=$objp->accountancy_journal;
|
||||||
|
$accountstatic->ref=$objp->ref;
|
||||||
print $accountstatic->getNomUrl(1);
|
print $accountstatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1035,7 +1039,7 @@ if ($rowid > 0)
|
|||||||
//print '<tr><td colspan="2"><b>'.$langs->trans("Payment").'</b></td></tr>';
|
//print '<tr><td colspan="2"><b>'.$langs->trans("Payment").'</b></td></tr>';
|
||||||
|
|
||||||
// No more action
|
// No more action
|
||||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('MoreActions');
|
print '<tr><td class="tdtop fieldrequired">'.$langs->trans('MoreActions');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($invoiceonly) && empty($bankviainvoice)?' checked':'').'> '.$langs->trans("None").'<br>';
|
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($invoiceonly) && empty($bankviainvoice)?' checked':'').'> '.$langs->trans("None").'<br>';
|
||||||
|
|||||||
@ -40,6 +40,7 @@ $action=GETPOST("action",'alpha');
|
|||||||
$rowid=GETPOST("rowid","int")?GETPOST("rowid","int"):GETPOST("id","int");
|
$rowid=GETPOST("rowid","int")?GETPOST("rowid","int"):GETPOST("id","int");
|
||||||
$typeid=GETPOST("typeid","int");
|
$typeid=GETPOST("typeid","int");
|
||||||
$cancel=GETPOST('cancel');
|
$cancel=GETPOST('cancel');
|
||||||
|
$confirm=GETPOST('confirm');
|
||||||
|
|
||||||
if (! $user->rights->adherent->cotisation->lire)
|
if (! $user->rights->adherent->cotisation->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -62,10 +63,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include,
|
|||||||
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
|
||||||
if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update' && ! $_POST["cancel"])
|
if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $cancel)
|
||||||
{
|
{
|
||||||
// Charge objet actuel
|
// Charge objet actuel
|
||||||
$result=$object->fetch($_POST["rowid"]);
|
$result=$object->fetch($rowid);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@ -138,7 +139,7 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->rights->adherent->cotisation->creer)
|
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->adherent->cotisation->creer)
|
||||||
{
|
{
|
||||||
$result=$object->fetch($rowid);
|
$result=$object->fetch($rowid);
|
||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
@ -189,11 +190,11 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||||||
|
|
||||||
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
||||||
|
|
||||||
print "\n";
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
print "\n";
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td class="valeur" colspan="3">';
|
print '<td class="valeur" colspan="3">';
|
||||||
@ -287,49 +288,50 @@ if ($rowid && $action != 'edit')
|
|||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
dol_banner_tab($object, 'rowid', $linkback, 1);
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>';
|
|
||||||
print '<td class="valeur" colspan="3">';
|
print '<div class="fichecenter">';
|
||||||
print $form->showrefnav($object, 'rowid', $linkback, 1);
|
|
||||||
print '</td></tr>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Member
|
// Member
|
||||||
$adh->ref=$adh->getFullName($langs);
|
$adh->ref=$adh->getFullName($langs);
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Member").'</td><td class="valeur" colspan="3">'.$adh->getNomUrl(1,0,'subscription').'</td>';
|
print '<td class="titlefield">'.$langs->trans("Member").'</td><td class="valeur">'.$adh->getNomUrl(1,0,'subscription').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date record
|
// Date record
|
||||||
/*print '<tr>';
|
/*print '<tr>';
|
||||||
print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($object->datec,'dayhour').'</td>';
|
print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur">'.dol_print_date($object->datec,'dayhour').'</td>';
|
||||||
print '</tr>';*/
|
print '</tr>';*/
|
||||||
|
|
||||||
// Date subscription
|
// Date subscription
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($object->dateh,'day').'</td>';
|
print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur">'.dol_print_date($object->dateh,'day').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date end subscription
|
// Date end subscription
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($object->datef,'day').'</td>';
|
print '<td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur">'.dol_print_date($object->datef,'day').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur" colspan="3">'.price($object->amount).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur">'.price($object->amount).'</td></tr>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="3">'.$object->note.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur">'.$object->note.'</td></tr>';
|
||||||
|
|
||||||
// Bank line
|
// Bank line
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
if ($conf->global->ADHERENT_BANK_USE || $object->fk_bank)
|
if ($conf->global->ADHERENT_BANK_USE || $object->fk_bank)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="3">';
|
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur">';
|
||||||
if ($object->fk_bank)
|
if ($object->fk_bank)
|
||||||
{
|
{
|
||||||
$bankline=new AccountLine($db);
|
$bankline=new AccountLine($db);
|
||||||
@ -346,6 +348,8 @@ if ($rowid && $action != 'edit')
|
|||||||
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
@ -61,7 +61,7 @@ $result=restrictedArea($user,'adherent','','','cotisation');
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search="";
|
$search="";
|
||||||
$search_ref="";
|
$search_ref="";
|
||||||
@ -110,7 +110,7 @@ if ($search_account > 0) $sql.= " AND b.fk_account = ".$search_account;
|
|||||||
if ($search_amount) $sql.= natural_search('c.subscription', $search_amount, 1);
|
if ($search_amount) $sql.= natural_search('c.subscription', $search_amount, 1);
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -154,7 +154,10 @@ if ($result)
|
|||||||
print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
|
print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid",$param,"","",$sortfield,$sortorder);
|
||||||
@ -301,6 +304,7 @@ if ($result)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -68,7 +68,7 @@ $extrafields = new ExtraFields($db);
|
|||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label('adherent_type');
|
$extralabels=$extrafields->fetch_name_optionals_label('adherent_type');
|
||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_lastname="";
|
$search_lastname="";
|
||||||
$search_login="";
|
$search_login="";
|
||||||
@ -91,10 +91,10 @@ if ($action == 'add' && $user->rights->adherent->configurer)
|
|||||||
$object = new AdherentType($db);
|
$object = new AdherentType($db);
|
||||||
|
|
||||||
$object->libelle = trim($label);
|
$object->libelle = trim($label);
|
||||||
$object->subscription = trim($subscription);
|
$object->subscription = (int) trim($subscription);
|
||||||
$object->note = trim($comment);
|
$object->note = trim($comment);
|
||||||
$object->mail_valid = trim($mail_valid);
|
$object->mail_valid = (boolean) trim($mail_valid);
|
||||||
$object->vote = trim($vote);
|
$object->vote = (boolean) trim($vote);
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
@ -129,10 +129,10 @@ if ($action == 'update' && $user->rights->adherent->configurer)
|
|||||||
$object = new AdherentType($db);
|
$object = new AdherentType($db);
|
||||||
$object->id = $rowid;
|
$object->id = $rowid;
|
||||||
$object->libelle = trim($label);
|
$object->libelle = trim($label);
|
||||||
$object->subscription = trim($subscription);
|
$object->subscription = (int) trim($subscription);
|
||||||
$object->note = trim($comment);
|
$object->note = trim($comment);
|
||||||
$object->mail_valid = trim($mail_valid);
|
$object->mail_valid = (boolean) trim($mail_valid);
|
||||||
$object->vote = trim($vote);
|
$object->vote = (boolean) trim($vote);
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
@ -181,7 +181,10 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Ref").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td>';
|
||||||
@ -209,6 +212,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -247,12 +251,12 @@ if ($action == 'create')
|
|||||||
print $form->selectyesno("vote",0,1);
|
print $form->selectyesno("vote",0,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
print '<textarea name="comment" wrap="soft" class="centpercent" rows="3"></textarea></td></tr>';
|
print '<textarea name="comment" wrap="soft" class="centpercent" rows="3"></textarea></td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$doleditor=new DolEditor('mail_valid',$object->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90);
|
$doleditor=new DolEditor('mail_valid',$object->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,'90%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -294,20 +298,15 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("MemberType"), 0, 'group');
|
dol_fiche_head($head, 'card', $langs->trans("MemberType"), 0, 'group');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/type.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/type.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
dol_banner_tab($object, 'rowid', $linkback);
|
||||||
print '<tr><td width="15%">'.$langs->trans("Ref").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->showrefnav($object, 'rowid', $linkback);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Label
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<tr><td width="15%">'.$langs->trans("Label").'</td><td>'.dol_escape_htmltag($object->libelle).'</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||||
print yn($object->subscription);
|
print yn($object->subscription);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -315,10 +314,10 @@ if ($rowid > 0)
|
|||||||
print yn($object->vote);
|
print yn($object->vote);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
print nl2br($object->note)."</td></tr>";
|
print nl2br($object->note)."</td></tr>";
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||||
print nl2br($object->mail_valid)."</td></tr>";
|
print nl2br($object->mail_valid)."</td></tr>";
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
@ -374,9 +373,7 @@ if ($rowid > 0)
|
|||||||
$sql.= " AND t.rowid = ".$object->id;
|
$sql.= " AND t.rowid = ".$object->id;
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
$sql.= " AND (d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
|
$sql.=natural_search(array("f.firstname","d.lastname","d.societe","d.email","d.login","d.address","d.town","d.note_public","d.note_private"), $sall);
|
||||||
$sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'";
|
|
||||||
$sql.= " OR d.town LIKE '%".$sall."%' OR d.note_public LIKE '%".$sall."%' OR d.note_private LIKE '%".$sall."%')";
|
|
||||||
}
|
}
|
||||||
if ($status != '')
|
if ($status != '')
|
||||||
{
|
{
|
||||||
@ -384,22 +381,22 @@ if ($rowid > 0)
|
|||||||
}
|
}
|
||||||
if ($action == 'search')
|
if ($action == 'search')
|
||||||
{
|
{
|
||||||
if (isset($_POST['search']) && $_POST['search'] != '')
|
if (GETPOST('search'))
|
||||||
{
|
{
|
||||||
$sql.= " AND (d.firstname LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')";
|
$sql.= natural_search(array("d.firstname","d.lastname"), GETPOST('search'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($search_lastname))
|
if (! empty($search_lastname))
|
||||||
{
|
{
|
||||||
$sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')";
|
$sql.= natural_search(array("d.firstname","d.lastname"), $search_lastname);
|
||||||
}
|
}
|
||||||
if (! empty($search_login))
|
if (! empty($search_login))
|
||||||
{
|
{
|
||||||
$sql.= " AND d.login LIKE '%".$search_login."%'";
|
$sql.= natural_search("d.login", $search_login);
|
||||||
}
|
}
|
||||||
if (! empty($search_email))
|
if (! empty($search_email))
|
||||||
{
|
{
|
||||||
$sql.= " AND d.email LIKE '%".$search_email."%'";
|
$sql.= natural_search("d.email", $search_email);
|
||||||
}
|
}
|
||||||
if ($filter == 'uptodate')
|
if ($filter == 'uptodate')
|
||||||
{
|
{
|
||||||
@ -410,7 +407,7 @@ if ($rowid > 0)
|
|||||||
$sql.=" AND datefin < '".$db->idate($now)."'";
|
$sql.=" AND datefin < '".$db->idate($now)."'";
|
||||||
}
|
}
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -462,9 +459,16 @@ if ($rowid > 0)
|
|||||||
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
|
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input class="flat" type="hidden" name="rowid" value="'.$rowid.'" size="12"></td>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);
|
||||||
@ -477,9 +481,6 @@ if ($rowid > 0)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
|
||||||
print '<input class="flat" type="hidden" name="rowid" value="'.$rowid.'" size="12"></td>';
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
@ -502,7 +503,6 @@ if ($rowid > 0)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num && $i < $conf->liste_limit)
|
while ($i < $num && $i < $conf->liste_limit)
|
||||||
@ -596,6 +596,8 @@ if ($rowid > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
print '</div>';
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
if ($num > $conf->liste_limit)
|
if ($num > $conf->liste_limit)
|
||||||
{
|
{
|
||||||
@ -645,12 +647,12 @@ if ($rowid > 0)
|
|||||||
print $form->selectyesno("vote",$object->vote,1);
|
print $form->selectyesno("vote",$object->vote,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
print '<textarea name="comment" wrap="soft" class="centpercent" rows="3">'.$object->note.'</textarea></td></tr>';
|
print '<textarea name="comment" wrap="soft" class="centpercent" rows="3">'.$object->note.'</textarea></td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$doleditor=new DolEditor('mail_valid',$object->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90);
|
$doleditor=new DolEditor('mail_valid',$object->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,'90%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2017 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) 2016 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
*
|
*
|
||||||
@ -375,7 +375,7 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
|||||||
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
|
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td align="center"> </td>'."\n";
|
||||||
print '<td align="right" class="nowrap">'."\n";
|
print '<td align="right" class="nowrap">'."\n";
|
||||||
$formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", '', 0, 1);
|
$formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,6 +407,37 @@ $tmplist=array('show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->tran
|
|||||||
print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW);
|
print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
// AGENDA NOTIFICATION
|
||||||
|
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'>'."\n";
|
||||||
|
print '<td>'.$langs->trans('AGENDA_NOTIFICATION').'</td>'."\n";
|
||||||
|
print '<td align="center"> </td>'."\n";
|
||||||
|
print '<td align="right">'."\n";
|
||||||
|
|
||||||
|
if (empty($conf->global->AGENDA_NOTIFICATION)) {
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_NOTIFICATION">'.img_picto($langs->trans('Disabled'),'switch_off').'</a>';
|
||||||
|
print '</td></tr>'."\n";
|
||||||
|
} else {
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_NOTIFICATION">'.img_picto($langs->trans('Enabled'),'switch_on').'</a>';
|
||||||
|
print '</td></tr>'."\n";
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'>'."\n";
|
||||||
|
print '<td>'.$langs->trans('AGENDA_NOTIFICATION_SOUND').'</td>'."\n";
|
||||||
|
print '<td align="center"> </td>'."\n";
|
||||||
|
print '<td align="right">'."\n";
|
||||||
|
|
||||||
|
if (empty($conf->global->AGENDA_NOTIFICATION_SOUND)) {
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_NOTIFICATION_SOUND">'.img_picto($langs->trans('Disabled'),'switch_off').'</a>';
|
||||||
|
} else {
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_NOTIFICATION_SOUND">'.img_picto($langs->trans('Enabled'),'switch_on').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</td></tr>'."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
@ -415,7 +446,6 @@ print '<div class="center"><input class="button" type="submit" name="save" value
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -329,7 +329,10 @@ print load_fiche_titre($langs->trans("BoxesAvailable"));
|
|||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
||||||
print '<input type="hidden" name="action" value="add">'."\n";
|
print '<input type="hidden" name="action" value="add">'."\n";
|
||||||
print '<table class="noborder" width="100%">'."\n";
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="tagtable liste centpercent">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="300">'.$langs->trans("Box").'</td>';
|
print '<td width="300">'.$langs->trans("Box").'</td>';
|
||||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||||
@ -375,6 +378,8 @@ foreach($boxtoadd as $box)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '<div class="right">';
|
print '<div class="right">';
|
||||||
print '<input type="submit" class="button"'.(count($boxtoadd)?'':' disabled').' value="'.$langs->trans("Activate").'">';
|
print '<input type="submit" class="button"'.(count($boxtoadd)?'':' disabled').' value="'.$langs->trans("Activate").'">';
|
||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
@ -388,7 +393,9 @@ $boxactivated=InfoBox::listBoxes($db,'activated',-1,null);
|
|||||||
print "<br>\n\n";
|
print "<br>\n\n";
|
||||||
print load_fiche_titre($langs->trans("BoxesActivated"));
|
print load_fiche_titre($langs->trans("BoxesActivated"));
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="tagtable liste">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="300">'.$langs->trans("Box").'</td>';
|
print '<td width="300">'.$langs->trans("Box").'</td>';
|
||||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||||
@ -441,7 +448,9 @@ foreach($boxactivated as $key => $box)
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table><br>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Other parameters
|
// Other parameters
|
||||||
|
|||||||
@ -306,12 +306,12 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
print '<tr class="liste_titre"><th class="titlefield">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||||
print '<input name="nom" id="name" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM:$_POST["nom"]) . '" autofocus="autofocus"></td></tr>'."\n";
|
print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM:$_POST["nom"]) . '" autofocus="autofocus"></td></tr>'."\n";
|
||||||
|
|
||||||
// Addresse
|
// Addresse
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -320,11 +320,11 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||||
print '<input name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_SOCIETE_ZIP?$conf->global->MAIN_INFO_SOCIETE_ZIP:$_POST["zipcode"]) . '" size="10"></td></tr>'."\n";
|
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_SOCIETE_ZIP?$conf->global->MAIN_INFO_SOCIETE_ZIP:$_POST["zipcode"]) . '"></td></tr>'."\n";
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
||||||
print '<input name="town" id="town" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_TOWN?$conf->global->MAIN_INFO_SOCIETE_TOWN:$_POST["town"]) . '"></td></tr>'."\n";
|
print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_SOCIETE_TOWN?$conf->global->MAIN_INFO_SOCIETE_TOWN:$_POST["town"]) . '"></td></tr>'."\n";
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -356,20 +356,20 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||||
print '<input name="mail" id="email" size="60" value="'. $conf->global->MAIN_INFO_SOCIETE_MAIL . '"></td></tr>';
|
print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_SOCIETE_MAIL . '"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Web
|
// Web
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||||
print '<input name="web" id="web" size="60" value="'. $conf->global->MAIN_INFO_SOCIETE_WEB . '"></td></tr>';
|
print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_SOCIETE_WEB . '"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
if (! empty($conf->barcode->enabled)) {
|
if (! empty($conf->barcode->enabled)) {
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
|
||||||
print '<input name="barcode" id="barcode" size="40" value="'. $conf->global->MAIN_INFO_SOCIETE_GENCOD . '"></td></tr>';
|
print '<input name="barcode" id="barcode" class="minwidth150" value="'. $conf->global->MAIN_INFO_SOCIETE_GENCOD . '"></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr'.dol_bc($var,'hideonsmartphone').'><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
print '<tr'.dol_bc($var,'hideonsmartphone').'><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||||
print '<input type="file" class="flat" name="logo" id="logo" size="50">';
|
print '<input type="file" class="flat class=minwidth200" name="logo" id="logo">';
|
||||||
print '</td><td class="nocellnopadd" valign="middle" align="right">';
|
print '</td><td class="nocellnopadd" valign="middle" align="right">';
|
||||||
if (! empty($mysoc->logo_mini)) {
|
if (! empty($mysoc->logo_mini)) {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
||||||
@ -393,7 +393,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td valign="top"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
||||||
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '').'</textarea></td></tr>';
|
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '').'</textarea></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -410,13 +410,13 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
// Managing Director(s)
|
// Managing Director(s)
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
||||||
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" size="80" value="' . $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '"></td></tr>';
|
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" class="minwidth200" value="' . $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '"></td></tr>';
|
||||||
|
|
||||||
// Capital
|
// Capital
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
||||||
print '<input name="capital" id="capital" size="20" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
|
print '<input name="capital" id="capital" class="minwidth100" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
|
||||||
|
|
||||||
// Juridical Status
|
// Juridical Status
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -432,10 +432,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid1">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid1">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="siren" id="profid1" size="20" value="' . (! empty($conf->global->MAIN_INFO_SIREN) ? $conf->global->MAIN_INFO_SIREN : '') . '">';
|
print '<input name="siren" id="profid1" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_SIREN) ? $conf->global->MAIN_INFO_SIREN : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -448,10 +448,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid2">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid2">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="siret" id="profid2" size="20" value="' . (! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
|
print '<input name="siret" id="profid2" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -464,10 +464,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid3">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid3">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="ape" id="profid3" size="20" value="' . (! empty($conf->global->MAIN_INFO_APE) ? $conf->global->MAIN_INFO_APE : '') . '">';
|
print '<input name="ape" id="profid3" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_APE) ? $conf->global->MAIN_INFO_APE : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -480,10 +480,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid4">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid4">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="rcs" id="profid4" size="20" value="' . (! empty($conf->global->MAIN_INFO_RCS) ? $conf->global->MAIN_INFO_RCS : '') . '">';
|
print '<input name="rcs" id="profid4" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_RCS) ? $conf->global->MAIN_INFO_RCS : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -496,10 +496,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid5">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid5">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="MAIN_INFO_PROFID5" id="profid5" size="20" value="' . (! empty($conf->global->MAIN_INFO_PROFID5) ? $conf->global->MAIN_INFO_PROFID5 : '') . '">';
|
print '<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_PROFID5) ? $conf->global->MAIN_INFO_PROFID5 : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -512,10 +512,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid6">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid6">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="MAIN_INFO_PROFID6" id="profid6" size="20" value="' . (! empty($conf->global->MAIN_INFO_PROFID6) ? $conf->global->MAIN_INFO_PROFID6 : '') . '">';
|
print '<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_PROFID6) ? $conf->global->MAIN_INFO_PROFID6 : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -526,13 +526,13 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
// TVA Intra
|
// TVA Intra
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
|
||||||
print '<input name="tva" id="intra_vat" size="20" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
print '<input name="tva" id="intra_vat" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Object of the company
|
// Object of the company
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
|
||||||
print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
|
print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -543,12 +543,12 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="fiscalmonthstart">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="fiscalmonthstart">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
|
||||||
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',0,1) . '</td></tr>';
|
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',0,1) . '</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@ -558,7 +558,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
|
print '<td class="titlefield">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td align="right"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -699,19 +699,19 @@ else
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyName").'</td><td>';
|
print '<tr '.$bc[$var].'><td class="titlefield">'.$langs->trans("CompanyName").'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM;
|
if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM;
|
||||||
else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).'</font>';
|
else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).'</font>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
|
||||||
@ -731,7 +731,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyCurrency").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCurrency").'</td><td>';
|
||||||
print currency_name($conf->currency,1);
|
print currency_name($conf->currency,1);
|
||||||
print ' ('.$conf->currency;
|
print ' ('.$conf->currency;
|
||||||
print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
|
print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
|
||||||
@ -739,52 +739,54 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . '</td></tr>';
|
||||||
|
|
||||||
// Web
|
// Web
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_SOCIETE_WEB,'_blank',80) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_SOCIETE_WEB,'_blank',80) . '</td></tr>';
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
if (! empty($conf->barcode->enabled))
|
if (! empty($conf->barcode->enabled))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Gencod").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Gencod").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Logo").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Logo").'</td><td>';
|
||||||
|
|
||||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
$tagtd='tagtd ';
|
||||||
|
if ($conf->browser->layout == 'phone') $tagtd='';
|
||||||
|
print '<div class="tagtable centpercent"><div class="tagtr inline-block centpercent valignmiddle"><div class="'.$tagtd.'inline-block valignmiddle left">';
|
||||||
print $mysoc->logo;
|
print $mysoc->logo;
|
||||||
print '</td><td class="nocellnopadd" valign="center" align="right">';
|
print '</div><div class="'.$tagtd.'inline-block valignmiddle left">';
|
||||||
|
|
||||||
// It offers the generation of the thumbnail if it does not exist
|
// It offers the generation of the thumbnail if it does not exist
|
||||||
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
|
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a> ';
|
print '<a class="img_logo" href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a> ';
|
||||||
}
|
}
|
||||||
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
print '<img class="img_logo" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||||
}
|
}
|
||||||
print '</td></tr></table>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%" valign="top">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
|
print '<tr '.$bc[$var].'><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -796,22 +798,22 @@ else
|
|||||||
print '<form name="formsoc" method="post">';
|
print '<form name="formsoc" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
// Managing Director(s)
|
// Managing Director(s)
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ManagingDirectors").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("ManagingDirectors").'</td><td>';
|
||||||
print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '</td></tr>';
|
print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '</td></tr>';
|
||||||
|
|
||||||
// Capital
|
// Capital
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Capital").'</td><td>';
|
||||||
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
|
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
|
||||||
|
|
||||||
// Juridical Status
|
// Juridical Status
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("JuridicalStatus").'</td><td>';
|
||||||
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
|
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -819,7 +821,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_SIREN))
|
if (! empty($conf->global->MAIN_INFO_SIREN))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_SIREN;
|
print $conf->global->MAIN_INFO_SIREN;
|
||||||
@ -835,7 +837,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_SIRET))
|
if (! empty($conf->global->MAIN_INFO_SIRET))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_SIRET;
|
print $conf->global->MAIN_INFO_SIRET;
|
||||||
@ -851,7 +853,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_APE))
|
if (! empty($conf->global->MAIN_INFO_APE))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_APE;
|
print $conf->global->MAIN_INFO_APE;
|
||||||
@ -867,7 +869,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_RCS))
|
if (! empty($conf->global->MAIN_INFO_RCS))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_RCS;
|
print $conf->global->MAIN_INFO_RCS;
|
||||||
@ -883,7 +885,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_PROFID5;
|
print $conf->global->MAIN_INFO_PROFID5;
|
||||||
@ -899,7 +901,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_PROFID6;
|
print $conf->global->MAIN_INFO_PROFID6;
|
||||||
@ -950,7 +952,7 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%" valign="top">'.$langs->trans("CompanyObject").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
|
print '<tr '.$bc[$var].'><td class="tdtop">'.$langs->trans("CompanyObject").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
@ -961,12 +963,12 @@ else
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("FiscalMonthStart").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("FiscalMonthStart").'</td><td>';
|
||||||
$monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1;
|
$monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1;
|
||||||
print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . '</td></tr>';
|
print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -182,6 +182,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" id="action" name="action" value="">';
|
print '<input type="hidden" id="action" name="action" value="">';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
@ -297,6 +298,7 @@ if ($result)
|
|||||||
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
@ -311,6 +313,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -112,7 +112,12 @@ $modules=array(
|
|||||||
array(
|
array(
|
||||||
'code' => 'MAIN_DELAY_EXPENSEREPORTS',
|
'code' => 'MAIN_DELAY_EXPENSEREPORTS',
|
||||||
'img' => 'trip'
|
'img' => 'trip'
|
||||||
)
|
),
|
||||||
|
/* TODO Enable this
|
||||||
|
array(
|
||||||
|
'code' => 'MAIN_DELAY_EXPENSEREPORTS_TO_PAY',
|
||||||
|
'img' => 'trip'
|
||||||
|
)*/
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -557,6 +557,7 @@ if ($id == 25)
|
|||||||
if ($conf->fournisseur->enabled) $elementList['order_supplier_send']=$langs->trans('MailToSendSupplierOrder');
|
if ($conf->fournisseur->enabled) $elementList['order_supplier_send']=$langs->trans('MailToSendSupplierOrder');
|
||||||
if ($conf->fournisseur->enabled) $elementList['invoice_supplier_send']=$langs->trans('MailToSendSupplierInvoice');
|
if ($conf->fournisseur->enabled) $elementList['invoice_supplier_send']=$langs->trans('MailToSendSupplierInvoice');
|
||||||
if ($conf->societe->enabled) $elementList['thirdparty']=$langs->trans('MailToThirdparty');
|
if ($conf->societe->enabled) $elementList['thirdparty']=$langs->trans('MailToThirdparty');
|
||||||
|
if ($conf->contrat->enabled) $elementList['contract']=$langs->trans('MailToSendContract');
|
||||||
|
|
||||||
$parameters=array('elementList'=>$elementList);
|
$parameters=array('elementList'=>$elementList);
|
||||||
$reshook=$hookmanager->executeHooks('emailElementlist',$parameters); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('emailElementlist',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||||
@ -675,8 +676,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Clean some parameters
|
// Clean some parameters
|
||||||
if (! empty($_POST["localtax1_type"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
|
if ((! empty($_POST["localtax1_type"]) || ($_POST['localtax1_type'] == '0')) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
|
||||||
if (! empty($_POST["localtax2_type"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
|
if ((! empty($_POST["localtax2_type"]) || ($_POST['localtax2_type'] == '0')) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
|
||||||
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
|
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
|
||||||
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
|
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
|
||||||
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
|
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
|
||||||
@ -1034,9 +1035,9 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
||||||
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
||||||
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
||||||
if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); }
|
if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); }
|
||||||
if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); }
|
if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); }
|
||||||
if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
||||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
||||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); }
|
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); }
|
||||||
@ -1052,6 +1053,20 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
|
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
|
||||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||||
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
|
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
|
||||||
|
if ($fieldlist[$field]=='paper_size') { $valuetoshow=$langs->trans("PaperSize"); }
|
||||||
|
if ($fieldlist[$field]=='orientation') { $valuetoshow=$langs->trans("Orientation"); }
|
||||||
|
if ($fieldlist[$field]=='leftmargin') { $valuetoshow=$langs->trans("LeftMargin"); }
|
||||||
|
if ($fieldlist[$field]=='topmargin') { $valuetoshow=$langs->trans("TopMargin"); }
|
||||||
|
if ($fieldlist[$field]=='spacex') { $valuetoshow=$langs->trans("SpaceX"); }
|
||||||
|
if ($fieldlist[$field]=='spacey') { $valuetoshow=$langs->trans("SpaceY"); }
|
||||||
|
if ($fieldlist[$field]=='font_size') { $valuetoshow=$langs->trans("FontSize"); }
|
||||||
|
if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); }
|
||||||
|
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
||||||
|
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
||||||
|
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
||||||
|
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
|
||||||
|
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
||||||
|
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
||||||
|
|
||||||
if ($id == 2) // Special cas for state page
|
if ($id == 2) // Special cas for state page
|
||||||
{
|
{
|
||||||
@ -1211,9 +1226,9 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
||||||
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
||||||
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
||||||
if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); }
|
if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); }
|
||||||
if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); }
|
if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); }
|
||||||
if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
||||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
|
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
|
||||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
|
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
|
||||||
@ -1229,6 +1244,20 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
|
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
|
||||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||||
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
|
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
|
||||||
|
if ($fieldlist[$field]=='paper_size') { $valuetoshow=$langs->trans("PaperSize"); }
|
||||||
|
if ($fieldlist[$field]=='orientation') { $valuetoshow=$langs->trans("Orientation"); }
|
||||||
|
if ($fieldlist[$field]=='leftmargin') { $valuetoshow=$langs->trans("LeftMargin"); }
|
||||||
|
if ($fieldlist[$field]=='topmargin') { $valuetoshow=$langs->trans("TopMargin"); }
|
||||||
|
if ($fieldlist[$field]=='spacex') { $valuetoshow=$langs->trans("SpaceX"); }
|
||||||
|
if ($fieldlist[$field]=='spacey') { $valuetoshow=$langs->trans("SpaceY"); }
|
||||||
|
if ($fieldlist[$field]=='font_size') { $valuetoshow=$langs->trans("FontSize"); }
|
||||||
|
if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); }
|
||||||
|
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
||||||
|
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
||||||
|
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
||||||
|
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
|
||||||
|
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
||||||
|
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
||||||
|
|
||||||
// Affiche nom du champ
|
// Affiche nom du champ
|
||||||
if ($showfield)
|
if ($showfield)
|
||||||
@ -1246,6 +1275,7 @@ if ($id)
|
|||||||
|
|
||||||
// Title line with search boxes
|
// Title line with search boxes
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
$filterfound=0;
|
||||||
foreach ($fieldlist as $field => $value)
|
foreach ($fieldlist as $field => $value)
|
||||||
{
|
{
|
||||||
$showfield=1; // By defaut
|
$showfield=1; // By defaut
|
||||||
@ -1256,21 +1286,25 @@ if ($id)
|
|||||||
{
|
{
|
||||||
if ($value == 'country')
|
if ($value == 'country')
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td class="liste_titre">';
|
||||||
print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone');
|
print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
$filterfound++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($id == 4) print '<td></td>';
|
if ($id == 4) print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre" colspan="2" align="right">';
|
print '<td class="liste_titre" colspan="2" align="right">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
if ($filterfound)
|
||||||
print $searchpitco;
|
{
|
||||||
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
|
print $searchpitco;
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -1286,19 +1320,17 @@ if ($id)
|
|||||||
print '<tr '.$bc[$var].' id="rowid-'.$obj->rowid.'">';
|
print '<tr '.$bc[$var].' id="rowid-'.$obj->rowid.'">';
|
||||||
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
|
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
|
||||||
{
|
{
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
|
||||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
|
||||||
|
|
||||||
$tmpaction='edit';
|
$tmpaction='edit';
|
||||||
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||||
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||||
|
|
||||||
|
// Show fields
|
||||||
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
|
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
|
||||||
|
|
||||||
print '<td colspan="3" align="center">';
|
print '<td colspan="3" align="center">';
|
||||||
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
|
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||||
print '<div name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"></div>';
|
print '<div name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"></div>';
|
||||||
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||||
@ -1758,10 +1790,10 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
||||||
print '<td><input type="text" class="flat" value="'.price((! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')).'" size="8" name="'.$fieldlist[$field].'"></td>';
|
print '<td><input type="text" class="flat minwidth75" value="'.price((! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')).'" name="'.$fieldlist[$field].'"></td>';
|
||||||
}
|
}
|
||||||
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
|
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
|
||||||
print '<td><input type="text" class="flat" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" size="10" name="'.$fieldlist[$field].'"></td>';
|
print '<td><input type="text" class="flat minwidth100" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'"></td>';
|
||||||
}
|
}
|
||||||
elseif ($fieldlist[$field]=='unit') {
|
elseif ($fieldlist[$field]=='unit') {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -1801,8 +1833,8 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$size=''; $class='';
|
$size=''; $class='';
|
||||||
if ($fieldlist[$field]=='code') $size='size="8" ';
|
if ($fieldlist[$field]=='code') $class='maxwidth100';
|
||||||
if ($fieldlist[$field]=='position') $size='size="4" ';
|
if ($fieldlist[$field]=='position') $class='maxwidth50';
|
||||||
if ($fieldlist[$field]=='libelle') $class='quatrevingtpercent';
|
if ($fieldlist[$field]=='libelle') $class='quatrevingtpercent';
|
||||||
if ($fieldlist[$field]=='tracking') $class='quatrevingtpercent';
|
if ($fieldlist[$field]=='tracking') $class='quatrevingtpercent';
|
||||||
if ($fieldlist[$field]=='sortorder' || $fieldlist[$field]=='sens' || $fieldlist[$field]=='category_type') $size='size="2" ';
|
if ($fieldlist[$field]=='sortorder' || $fieldlist[$field]=='sens' || $fieldlist[$field]=='category_type') $size='size="2" ';
|
||||||
|
|||||||
@ -46,27 +46,27 @@ if (!$user->admin) accessforbidden();
|
|||||||
$modules = array(
|
$modules = array(
|
||||||
'SOCIETE' => 'FCKeditorForCompany',
|
'SOCIETE' => 'FCKeditorForCompany',
|
||||||
'PRODUCTDESC' => 'FCKeditorForProduct',
|
'PRODUCTDESC' => 'FCKeditorForProduct',
|
||||||
'MAILING' => 'FCKeditorForMailing',
|
|
||||||
'DETAILS' => 'FCKeditorForProductDetails',
|
'DETAILS' => 'FCKeditorForProductDetails',
|
||||||
'USERSIGN' => 'FCKeditorForUserSignature',
|
'USERSIGN' => 'FCKeditorForUserSignature',
|
||||||
|
'MAILING' => 'FCKeditorForMailing',
|
||||||
'MAIL' => 'FCKeditorForMail'
|
'MAIL' => 'FCKeditorForMail'
|
||||||
);
|
);
|
||||||
// Conditions pour que l'option soit proposee
|
// Conditions pour que l'option soit proposee
|
||||||
$conditions = array(
|
$conditions = array(
|
||||||
'SOCIETE' => 1,
|
'SOCIETE' => 1,
|
||||||
'PRODUCTDESC' => (! empty($conf->product->enabled) || ! empty($conf->service->enabled)),
|
'PRODUCTDESC' => (! empty($conf->product->enabled) || ! empty($conf->service->enabled)),
|
||||||
'MAILING' => ! empty($conf->mailing->enabled),
|
|
||||||
'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->supplier_proposal->enabled) || ! empty($conf->fournisseur->enabled)),
|
'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->supplier_proposal->enabled) || ! empty($conf->fournisseur->enabled)),
|
||||||
'USERSIGN' => 1,
|
'USERSIGN' => 1,
|
||||||
|
'MAILING' => ! empty($conf->mailing->enabled),
|
||||||
'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled))
|
'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled))
|
||||||
);
|
);
|
||||||
// Picto
|
// Picto
|
||||||
$picto = array(
|
$picto = array(
|
||||||
'SOCIETE' => 'generic',
|
'SOCIETE' => 'generic',
|
||||||
'PRODUCTDESC' => 'product',
|
'PRODUCTDESC' => 'product',
|
||||||
'MAILING' => 'email',
|
'DETAILS' => 'product',
|
||||||
'DETAILS' => 'generic',
|
|
||||||
'USERSIGN' => 'user',
|
'USERSIGN' => 'user',
|
||||||
|
'MAILING' => 'email',
|
||||||
'MAIL' => 'email'
|
'MAIL' => 'email'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@ $langs->load("products");
|
|||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$langs->load("hrm");
|
$langs->load("hrm");
|
||||||
|
$langs->load("agenda");
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -404,7 +404,7 @@ if ($action == 'edit')
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
$liste = array();
|
$liste = array();
|
||||||
$liste['user'] = $langs->trans('UserEmail');
|
$liste['user'] = $langs->trans('UserEmail');
|
||||||
$liste['company'] = $langs->trans('CompanyEmail');
|
$liste['company'] = $langs->trans('CompanyEmail').' ('.(empty($conf->global->MAIN_INFO_SOCIETE_MAIL)?$langs->trans("NotDefined"):$conf->global->MAIN_INFO_SOCIETE_MAIL).')';
|
||||||
|
|
||||||
print '<tr '.$bc[$var?1:0].'><td>'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').'</td><td>';
|
print '<tr '.$bc[$var?1:0].'><td>'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').'</td><td>';
|
||||||
print $form->selectarray('MAIN_MAIL_DEFAULT_FROMTYPE',$liste,$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE,0);
|
print $form->selectarray('MAIN_MAIL_DEFAULT_FROMTYPE',$liste,$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE,0);
|
||||||
@ -619,6 +619,12 @@ else
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||||
|
{
|
||||||
|
$text = $langs->trans("WarningPHPMail");
|
||||||
|
print info_admin($text);
|
||||||
|
}
|
||||||
|
|
||||||
// Run the test to connect
|
// Run the test to connect
|
||||||
if ($action == 'testconnect')
|
if ($action == 'testconnect')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -71,7 +71,7 @@ if ($action == 'up')
|
|||||||
// Get current position
|
// Get current position
|
||||||
$sql = "SELECT m.rowid, m.position, m.type, m.fk_menu";
|
$sql = "SELECT m.rowid, m.position, m.type, m.fk_menu";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||||
$sql.= " WHERE m.rowid = ".$_GET["menuId"];
|
$sql.= " WHERE m.rowid = ".GETPOST("menuId","int");
|
||||||
dol_syslog("admin/menus/index.php ".$sql);
|
dol_syslog("admin/menus/index.php ".$sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
@ -89,11 +89,11 @@ if ($action == 'up')
|
|||||||
// Menu before
|
// Menu before
|
||||||
$sql = "SELECT m.rowid, m.position";
|
$sql = "SELECT m.rowid, m.position";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||||
$sql.= " WHERE (m.position < ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid < ".$_GET["menuId"]."))";
|
$sql.= " WHERE (m.position < ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid < ".GETPOST("menuId","int")."))";
|
||||||
$sql.= " AND m.menu_handler='".$menu_handler_to_search."'";
|
$sql.= " AND m.menu_handler='".$db->escape($menu_handler_to_search)."'";
|
||||||
$sql.= " AND m.entity = ".$conf->entity;
|
$sql.= " AND m.entity = ".$conf->entity;
|
||||||
$sql.= " AND m.type = '".$current['type']."'";
|
$sql.= " AND m.type = '".$db->escape($current['type'])."'";
|
||||||
$sql.= " AND m.fk_menu = '".$current['fk_menu']."'";
|
$sql.= " AND m.fk_menu = '".$db->escape($current['fk_menu'])."'";
|
||||||
$sql.= " ORDER BY m.position, m.rowid";
|
$sql.= " ORDER BY m.position, m.rowid";
|
||||||
dol_syslog("admin/menus/index.php ".$sql);
|
dol_syslog("admin/menus/index.php ".$sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -127,7 +127,7 @@ elseif ($action == 'down')
|
|||||||
// Get current position
|
// Get current position
|
||||||
$sql = "SELECT m.rowid, m.position, m.type, m.fk_menu";
|
$sql = "SELECT m.rowid, m.position, m.type, m.fk_menu";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||||
$sql.= " WHERE m.rowid = ".$_GET["menuId"];
|
$sql.= " WHERE m.rowid = ".GETPOST("menuId","int");
|
||||||
dol_syslog("admin/menus/index.php ".$sql);
|
dol_syslog("admin/menus/index.php ".$sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
@ -145,11 +145,11 @@ elseif ($action == 'down')
|
|||||||
// Menu after
|
// Menu after
|
||||||
$sql = "SELECT m.rowid, m.position";
|
$sql = "SELECT m.rowid, m.position";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||||
$sql.= " WHERE (m.position > ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid > ".$_GET["menuId"]."))";
|
$sql.= " WHERE (m.position > ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid > ".GETPOST("menuId","int")."))";
|
||||||
$sql.= " AND m.menu_handler='".$menu_handler_to_search."'";
|
$sql.= " AND m.menu_handler='".$db->escape($menu_handler_to_search)."'";
|
||||||
$sql.= " AND m.entity = ".$conf->entity;
|
$sql.= " AND m.entity = ".$conf->entity;
|
||||||
$sql.= " AND m.type = '".$current['type']."'";
|
$sql.= " AND m.type = '".$db->escape($current['type'])."'";
|
||||||
$sql.= " AND m.fk_menu = '".$current['fk_menu']."'";
|
$sql.= " AND m.fk_menu = '".$db->escape($current['fk_menu'])."'";
|
||||||
$sql.= " ORDER BY m.position, m.rowid";
|
$sql.= " ORDER BY m.position, m.rowid";
|
||||||
dol_syslog("admin/menus/index.php ".$sql);
|
dol_syslog("admin/menus/index.php ".$sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -180,7 +180,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes')
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu";
|
||||||
$sql.= " WHERE rowid = ".$_GET['menuId'];
|
$sql.= " WHERE rowid = ".GETPOST('menuId','int');
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@ -245,11 +245,11 @@ if ($action == 'delete')
|
|||||||
{
|
{
|
||||||
$sql = "SELECT m.titre";
|
$sql = "SELECT m.titre";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||||
$sql.= " WHERE m.rowid = ".$_GET['menuId'];
|
$sql.= " WHERE m.rowid = ".GETPOST('menuId','int');
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete");
|
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".GETPOST('menuId','int'),$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -298,7 +298,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
|
|
||||||
$sql = "SELECT m.rowid, m.titre, m.langs, m.mainmenu, m.leftmenu, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.module";
|
$sql = "SELECT m.rowid, m.titre, m.langs, m.mainmenu, m.leftmenu, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.module";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||||
$sql.= " WHERE menu_handler = '".$menu_handler_to_search."'";
|
$sql.= " WHERE menu_handler = '".$db->escape($menu_handler_to_search)."'";
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
//$sql.= " AND fk_menu >= 0";
|
//$sql.= " AND fk_menu >= 0";
|
||||||
$sql.= " ORDER BY m.position, m.rowid"; // Order is position then rowid (because we need a sort criteria when position is same)
|
$sql.= " ORDER BY m.position, m.rowid"; // Order is position then rowid (because we need a sort criteria when position is same)
|
||||||
|
|||||||
@ -286,23 +286,10 @@ if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>
|
|||||||
$h = 0;
|
$h = 0;
|
||||||
|
|
||||||
$categidx='common'; // Main
|
$categidx='common'; // Main
|
||||||
//if (! empty($categ[$categidx]))
|
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||||
//{
|
$head[$h][1] = $langs->trans("AvailableModules");
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
$head[$h][2] = 'common';
|
||||||
$head[$h][1] = $langs->trans("AvailableModules");
|
$h++;
|
||||||
$head[$h][2] = 'common';
|
|
||||||
$h++;
|
|
||||||
//}
|
|
||||||
|
|
||||||
/*$categidx='expdev';
|
|
||||||
if (! empty($categ[$categidx]))
|
|
||||||
{
|
|
||||||
$categidx='expdev';
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
|
||||||
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
|
|
||||||
$head[$h][2] = 'expdev';
|
|
||||||
$h++;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$categidx='marketplace';
|
$categidx='marketplace';
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||||
@ -314,24 +301,25 @@ $h++;
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_head($head, $mode, '');
|
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
if ($mode != 'marketplace')
|
if ($mode != 'marketplace')
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
|
dol_fiche_head($head, $mode, '');
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
|
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
|
||||||
$moreforfilter.= '</div>';
|
$moreforfilter.= '</div>';
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, $search_nature, 1);
|
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1);
|
||||||
$moreforfilter.= '</div>';
|
$moreforfilter.= '</div>';
|
||||||
if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||||
{
|
{
|
||||||
@ -363,12 +351,16 @@ if ($mode != 'marketplace')
|
|||||||
//print '</div>';
|
//print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br><br><br><br>';
|
//dol_fiche_end();
|
||||||
|
|
||||||
|
print '<div class="clearboth"></div><br>';
|
||||||
|
//print '<br><br><br><br>';
|
||||||
|
|
||||||
|
$moreforfilter='';
|
||||||
|
|
||||||
// Show list of modules
|
// Show list of modules
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table summary="list_of_modules" id="list_of_modules" class="liste" width="100%">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" summary="list_of_modules" id="list_of_modules" >'."\n";
|
||||||
|
|
||||||
$oldfamily='';
|
$oldfamily='';
|
||||||
|
|
||||||
@ -425,7 +417,7 @@ if ($mode != 'marketplace')
|
|||||||
{
|
{
|
||||||
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
|
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
|
||||||
$publisher=dol_escape_htmltag($objMod->getPublisher());
|
$publisher=dol_escape_htmltag($objMod->getPublisher());
|
||||||
if ($reg[1] && $reg[1] != $publisher) continue;
|
if ($reg[1] && dol_escape_htmltag($reg[1]) != $publisher) continue;
|
||||||
if (! $reg[1] && ! empty($publisher)) continue;
|
if (! $reg[1] && ! empty($publisher)) continue;
|
||||||
}
|
}
|
||||||
if ($search_nature == 'core' && $objMod->isCoreOrExternalModule() == 'external') continue;
|
if ($search_nature == 'core' && $objMod->isCoreOrExternalModule() == 'external') continue;
|
||||||
@ -493,23 +485,26 @@ if ($mode != 'marketplace')
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
print '<td valign="top">'.$objMod->getName();
|
print '<td class="tdtop">'.$objMod->getName();
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Desc
|
// Desc
|
||||||
print '<td valign="top">';
|
print '<td class="tdtop">';
|
||||||
print nl2br($objMod->getDesc());
|
print nl2br($objMod->getDesc());
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Help
|
// Help
|
||||||
print '<td align="center" valign="top" class="nowrap" style="width: 82px;">';
|
print '<td align="center" valign="top" class="nowrap" style="width: 82px;">';
|
||||||
$text='';
|
$text='';
|
||||||
|
|
||||||
if ($objMod->getDescLong()) $text.='<div class="titre">'.$objMod->getDesc().'</div><br>'.$objMod->getDescLong().'<br>';
|
if ($objMod->getDescLong()) $text.='<div class="titre">'.$objMod->getDesc().'</div><br>'.$objMod->getDescLong().'<br>';
|
||||||
else $text.='<div class="titre">'.$objMod->getDesc().'</div><br>';
|
else $text.='<div class="titre">'.$objMod->getDesc().'</div><br>';
|
||||||
|
|
||||||
$textexternal='';
|
$textexternal='';
|
||||||
|
$imginfo="info";
|
||||||
if ($objMod->isCoreOrExternalModule() == 'external')
|
if ($objMod->isCoreOrExternalModule() == 'external')
|
||||||
{
|
{
|
||||||
|
$imginfo="info_black";
|
||||||
$textexternal.='<br><strong>'.$langs->trans("Origin").':</strong> '.$langs->trans("ExternalModule",$dirofmodule);
|
$textexternal.='<br><strong>'.$langs->trans("Origin").':</strong> '.$langs->trans("ExternalModule",$dirofmodule);
|
||||||
if ($objMod->editor_name != 'dolibarr') $textexternal.='<br><strong>'.$langs->trans("Publisher").':</strong> '.(empty($objMod->editor_name)?$langs->trans("Unknown"):$objMod->editor_name);
|
if ($objMod->editor_name != 'dolibarr') $textexternal.='<br><strong>'.$langs->trans("Publisher").':</strong> '.(empty($objMod->editor_name)?$langs->trans("Unknown"):$objMod->editor_name);
|
||||||
if (! empty($objMod->editor_url) && ! preg_match('/dolibarr\.org/i',$objMod->editor_url)) $textexternal.='<br><strong>'.$langs->trans("Url").':</strong> '.$objMod->editor_url;
|
if (! empty($objMod->editor_url) && ! preg_match('/dolibarr\.org/i',$objMod->editor_url)) $textexternal.='<br><strong>'.$langs->trans("Url").':</strong> '.$objMod->editor_url;
|
||||||
@ -653,7 +648,8 @@ if ($mode != 'marketplace')
|
|||||||
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
|
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
|
||||||
$text.=$langs->trans("DetectionNotPossible");
|
$text.=$langs->trans("DetectionNotPossible");
|
||||||
|
|
||||||
print $form->textwithpicto('', $text, 1, 'help', 'minheight20');
|
|
||||||
|
print $form->textwithpicto('', $text, 1, $imginfo, 'minheight20');
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -667,8 +663,6 @@ if ($mode != 'marketplace')
|
|||||||
if (preg_match('/experimental/i', $version)) print img_warning($langs->trans("Experimental"), 'style="float: left"');
|
if (preg_match('/experimental/i', $version)) print img_warning($langs->trans("Experimental"), 'style="float: left"');
|
||||||
if (preg_match('/deprecated/i', $version)) print img_warning($langs->trans("Deprecated"), 'style="float: left"');
|
if (preg_match('/deprecated/i', $version)) print img_warning($langs->trans("Deprecated"), 'style="float: left"');
|
||||||
|
|
||||||
// Picto external
|
|
||||||
if ($textexternal) print img_picto($langs->trans("ExternalModule",$dirofmodule), 'external', 'style="float: left"');
|
|
||||||
|
|
||||||
print $versiontrans;
|
print $versiontrans;
|
||||||
|
|
||||||
@ -767,9 +761,12 @@ if ($mode != 'marketplace')
|
|||||||
|
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
dol_fiche_head($head, $mode, '');
|
||||||
|
|
||||||
// Marketplace
|
// Marketplace
|
||||||
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
@ -781,7 +778,7 @@ else
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">\n";
|
print "<tr ".$bc[$var].">\n";
|
||||||
$url='https://www.dolistore.com';
|
$url='https://www.dolistore.com';
|
||||||
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" width="180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
|
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
|
||||||
print '<td>'.$langs->trans("DoliStoreDesc").'</td>';
|
print '<td>'.$langs->trans("DoliStoreDesc").'</td>';
|
||||||
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -789,18 +786,18 @@ else
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">\n";
|
print "<tr ".$bc[$var].">\n";
|
||||||
$url='https://partners.dolibarr.org';
|
$url='https://partners.dolibarr.org';
|
||||||
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" width="180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>';
|
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>';
|
||||||
print '<td>'.$langs->trans("DoliPartnersDesc").'</td>';
|
print '<td>'.$langs->trans("DoliPartnersDesc").'</td>';
|
||||||
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
//dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
// Show warning about external users
|
// Show warning about external users
|
||||||
if ($mode != 'marketplace') print info_admin(showModulesExludedForExternal($modules))."\n";
|
if ($mode != 'marketplace') print info_admin(showModulesExludedForExternal($modules))."\n";
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
|
|||||||
|
|
||||||
|
|
||||||
// Translations
|
// Translations
|
||||||
|
$langs->load("admin");
|
||||||
$langs->load("multicurrency");
|
$langs->load("multicurrency");
|
||||||
|
|
||||||
// Access control
|
// Access control
|
||||||
@ -323,8 +324,17 @@ print '<input type="text" name="rate" value="" size="13" placeholder="'.$langs->
|
|||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||||
print '</td></form></tr>';
|
print '</td></form></tr>';
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td>'.$conf->currency.$form->textwithpicto(' ', $langs->trans("BaseCurrency")).'</td>';
|
||||||
|
print '<td align="center" width="20"> </td>';
|
||||||
|
print '<td align="right" width="300">1';
|
||||||
|
print '</td></form></tr>';
|
||||||
|
|
||||||
foreach ($TCurrency as &$currency)
|
foreach ($TCurrency as &$currency)
|
||||||
{
|
{
|
||||||
|
if($currency->code == $conf->currency) continue;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td>'.$currency->code.' - '.$currency->name.'</td>';
|
print '<td>'.$currency->code.' - '.$currency->name.'</td>';
|
||||||
@ -334,10 +344,12 @@ foreach ($TCurrency as &$currency)
|
|||||||
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="update_currency">';
|
print '<input type="hidden" name="action" value="update_currency">';
|
||||||
print '<input type="hidden" name="fk_multicurrency" value="'.$currency->id.'">';
|
print '<input type="hidden" name="fk_multicurrency" value="'.$currency->id.'">';
|
||||||
print '<input type="text" name="rate" value="'.($currency->rate->rate ? $currency->rate->rate : '').'" size="13" /> ';
|
print '1 '.$conf->currency.' = ';
|
||||||
|
print '<input type="text" name="rate" value="'.($currency->rate->rate ? $currency->rate->rate : '').'" size="13" /> '.$currency->code.' ';
|
||||||
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Modify").'"> ';
|
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Modify").'"> ';
|
||||||
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Delete").'">';
|
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Delete").'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -104,6 +104,11 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Define $urlwithroot
|
||||||
|
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
||||||
|
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||||
|
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
llxHeader('',$langs->trans("PrintingSetup"));
|
llxHeader('',$langs->trans("PrintingSetup"));
|
||||||
@ -127,68 +132,177 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
if (in_array($key[0], array_keys($supportedoauth2array))) $supported=1;
|
if (in_array($key[0], array_keys($supportedoauth2array))) $supported=1;
|
||||||
if (! $supported) continue; // show only supported
|
if (! $supported) continue; // show only supported
|
||||||
|
|
||||||
|
|
||||||
|
$OAUTH_SERVICENAME='Unknown';
|
||||||
|
if ($key[0] == 'OAUTH_GITHUB_NAME')
|
||||||
|
{
|
||||||
|
$OAUTH_SERVICENAME='GitHub';
|
||||||
|
$urltorenew=$urlwithroot.'/core/modules/oauth/github_oauthcallback.php?state=user,public_repo&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||||
|
$urltodelete=$urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||||
|
$urltocheckperms='https://github.com/settings/applications/';
|
||||||
|
}
|
||||||
|
if ($key[0] == 'OAUTH_GOOGLE_NAME')
|
||||||
|
{
|
||||||
|
$OAUTH_SERVICENAME='Google';
|
||||||
|
$urltorenew=$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?state=userinfo_email,userinfo_profile,cloud_print&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||||
|
$urltodelete=$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||||
|
$urltocheckperms='https://security.google.com/settings/security/permissions';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show value of token
|
||||||
|
$tokenobj=null;
|
||||||
|
// Token
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||||
|
// Dolibarr storage
|
||||||
|
$storage = new DoliStorage($db, $conf);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
// Return an error if token not found
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set other properties
|
||||||
|
$refreshtoken=false;
|
||||||
|
$expiredat='';
|
||||||
|
|
||||||
|
$expire = false;
|
||||||
|
// Is token expired or will token expire in the next 30 seconds
|
||||||
|
if (is_object($tokenobj)) {
|
||||||
|
$expire = ($tokenobj->getEndOfLife() !== $tokenobj::EOL_NEVER_EXPIRES && $tokenobj->getEndOfLife() !== $tokenobj::EOL_UNKNOWN && time() > ($tokenobj->getEndOfLife() - 30));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($key[1] != '' && $key[2] != '') {
|
||||||
|
if (is_object($tokenobj)) {
|
||||||
|
$refreshtoken = $tokenobj->getRefreshToken();
|
||||||
|
|
||||||
|
$endoflife = $tokenobj->getEndOfLife();
|
||||||
|
if ($endoflife == $tokenobj::EOL_NEVER_EXPIRES)
|
||||||
|
{
|
||||||
|
$expiredat = $langs->trans("Never");
|
||||||
|
}
|
||||||
|
elseif ($endoflife == $tokenobj::EOL_UNKNOWN)
|
||||||
|
{
|
||||||
|
$expiredat = $langs->trans("Unknown");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$expiredat=dol_print_date($endoflife, "dayhour");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$submit_enabled=0;
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=setup&driver='.$driver.'" autocomplete="off">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=setup&driver='.$driver.'" autocomplete="off">';
|
||||||
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="setconst">';
|
print '<input type="hidden" name="action" value="setconst">';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">'."\n";
|
print '<table class="noborder" width="100%">'."\n";
|
||||||
$var=true;
|
|
||||||
|
$var=false;
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th>'.$langs->trans("Parameters").'</th>';
|
print '<th class="titlefieldcreate">'.$langs->trans($key[0]).'</th>';
|
||||||
print '<th>'.$langs->trans("Value").'</th>';
|
print '<th></th>';
|
||||||
print '<th> </th>';
|
print '<th></th>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$submit_enabled=0;
|
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td'.($key['required']?' class=required':'').'>'.$langs->trans($key['varname']).'</td>';
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
print '<td>'.$langs->trans($key['info']).'</td>';
|
//var_dump($key);
|
||||||
|
print $langs->trans("OAuthIDSecret").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS')
|
print $langs->trans("SeePreviousTab");
|
||||||
|
print '</td>';
|
||||||
|
print '<td>';
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
$var = ! $var;
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
|
//var_dump($key);
|
||||||
|
print $langs->trans("IsTokenGenerated");
|
||||||
|
print '</td>';
|
||||||
|
print '<td>';
|
||||||
|
if (is_object($tokenobj)) print $langs->trans("HasAccessToken");
|
||||||
|
else print $langs->trans("NoAccessToken");
|
||||||
|
print '</td>';
|
||||||
|
print '<td>';
|
||||||
|
// Links to delete/checks token
|
||||||
|
if (is_object($tokenobj))
|
||||||
{
|
{
|
||||||
// Delete remote tokens
|
//test on $storage->hasAccessToken($OAUTH_SERVICENAME) ?
|
||||||
if (! empty($key['delete'])) print '<a class="button" href="'.$key['delete'].'">'.$langs->trans('DeleteAccess').'</a><br><br>';
|
print '<a class="button" href="'.$urltodelete.'">'.$langs->trans('DeleteAccess').'</a><br><br>';
|
||||||
// Request remote token
|
}
|
||||||
print '<a class="button" href="'.$key['renew'].'">'.$langs->trans('RequestAccess').'</a><br><br>';
|
// Request remote token
|
||||||
// Check remote access
|
print '<a class="button" href="'.$urltorenew.'">'.$langs->trans('RequestAccess').'</a><br><br>';
|
||||||
print $langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME_GOOGLE).': <a href="https://security.google.com/settings/security/permissions" target="_google">https://security.google.com/settings/security/permissions</a>';
|
// Check remote access
|
||||||
|
if ($urltocheckperms)
|
||||||
|
{
|
||||||
|
print $langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': <a href="'.$urltocheckperms.'" target="_'.strtolower($OAUTH_SERVICENAME).'">'.$urltocheckperms.'</a>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = ! $var;
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
|
//var_dump($key);
|
||||||
|
print $langs->trans("Token").'</td>';
|
||||||
|
print '<td colspan="2">';
|
||||||
|
if (is_object($tokenobj))
|
||||||
|
{
|
||||||
|
//var_dump($tokenobj);
|
||||||
|
print $tokenobj->getAccessToken().'<br>';
|
||||||
|
//print 'Refresh: '.$tokenobj->getRefreshToken().'<br>';
|
||||||
|
//print 'EndOfLife: '.$tokenobj->getEndOfLife().'<br>';
|
||||||
|
//var_dump($tokenobj->getExtraParams());
|
||||||
|
/*print '<br>Extra: <br><textarea class="quatrevingtpercent">';
|
||||||
|
print ''.join(',',$tokenobj->getExtraParams());
|
||||||
|
print '</textarea>';*/
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
// Show value of token
|
if (is_object($tokenobj))
|
||||||
if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS')
|
|
||||||
{
|
{
|
||||||
// Token
|
// Token refresh
|
||||||
|
$var = ! $var;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td>'.$langs->trans("Token").'</td>';
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
print '<td>';
|
//var_dump($key);
|
||||||
// Dolibarr storage
|
print $langs->trans("TOKEN_REFRESH").'</td>';
|
||||||
$storage = new DoliStorage($db, $conf);
|
print '<td colspan="2">';
|
||||||
try
|
print yn($refreshtoken);
|
||||||
{
|
|
||||||
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME_GOOGLE);
|
|
||||||
}
|
|
||||||
catch(Exception $e)
|
|
||||||
{
|
|
||||||
// Return an error if token not found
|
|
||||||
}
|
|
||||||
if (is_object($tokenobj))
|
|
||||||
{
|
|
||||||
//var_dump($tokenobj);
|
|
||||||
print $tokenobj->getAccessToken().'<br>';
|
|
||||||
//print 'Refresh: '.$tokenobj->getRefreshToken().'<br>';
|
|
||||||
//print 'EndOfLife: '.$tokenobj->getEndOfLife().'<br>';
|
|
||||||
//var_dump($tokenobj->getExtraParams());
|
|
||||||
/*print '<br>Extra: <br><textarea class="quatrevingtpercent">';
|
|
||||||
print ''.join(',',$tokenobj->getExtraParams());
|
|
||||||
print '</textarea>';*/
|
|
||||||
}
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Token expired
|
||||||
|
$var = ! $var;
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
|
//var_dump($key);
|
||||||
|
print $langs->trans("TOKEN_EXPIRED").'</td>';
|
||||||
|
print '<td colspan="2">';
|
||||||
|
print yn($expire);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>';
|
||||||
|
|
||||||
|
// Token expired at
|
||||||
|
$var = ! $var;
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
|
//var_dump($key);
|
||||||
|
print $langs->trans("TOKEN_EXPIRE_AT").'</td>';
|
||||||
|
print '<td colspan="2">';
|
||||||
|
print $expiredat;
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -200,6 +314,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ if (!$user->admin) accessforbidden();
|
|||||||
if ($action == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."rights_def SET bydefault=1";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."rights_def SET bydefault=1";
|
||||||
$sql.= " WHERE id = ".$_GET["pid"];
|
$sql.= " WHERE id = ".GETPOST("pid",'int');
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@ if ($action == 'add')
|
|||||||
if ($action == 'remove')
|
if ($action == 'remove')
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."rights_def SET bydefault=0";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."rights_def SET bydefault=0";
|
||||||
$sql.= " WHERE id = ".$_GET["pid"];
|
$sql.= " WHERE id = ".GETPOST('pid','int');
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ dol_fiche_head($head, 'default', $langs->trans("Security"));
|
|||||||
// Show warning about external users
|
// Show warning about external users
|
||||||
print info_admin(showModulesExludedForExternal($modules)).'<br>'."\n";
|
print info_admin(showModulesExludedForExternal($modules)).'<br>'."\n";
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
// Affiche lignes des permissions
|
// Affiche lignes des permissions
|
||||||
@ -215,8 +215,9 @@ if ($result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -86,12 +86,12 @@ if ($sfurl)
|
|||||||
}
|
}
|
||||||
print ')';
|
print ')';
|
||||||
}
|
}
|
||||||
print ' / <a href="http://www.gnu.org/copyleft/gpl.html">GNU-GPL v3+</a></li>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $langs->trans("LastStableVersion").' : <b>' .$langs->trans("UpdateServerOffline").'</b><br>';
|
print ' ('.$langs->trans("LastStableVersion").' : <b>' .$langs->trans("UpdateServerOffline").'</b>)<br>';
|
||||||
}
|
}
|
||||||
|
print ' / <a href="http://www.gnu.org/copyleft/gpl.html">GNU-GPL v3+</a></li>';
|
||||||
|
|
||||||
|
|
||||||
print '</ul>';
|
print '</ul>';
|
||||||
|
|||||||
@ -48,6 +48,7 @@ $tmp=getBrowserInfo($_SERVER["HTTP_USER_AGENT"]);
|
|||||||
|
|
||||||
// Browser
|
// Browser
|
||||||
$var=true;
|
$var=true;
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -71,10 +72,10 @@ print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Screen").'</td><td col
|
|||||||
print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
|
print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -90,7 +90,8 @@ $configfileparameters=array(
|
|||||||
'?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
|
'?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
|
||||||
'separator',
|
'separator',
|
||||||
'?dolibarr_mailing_limit_sendbyweb',
|
'?dolibarr_mailing_limit_sendbyweb',
|
||||||
'?dolibarr_strict_mode'
|
'?dolibarr_mailing_limit_sendbycli',
|
||||||
|
'?dolibarr_strict_mode'
|
||||||
);
|
);
|
||||||
$configfilelib=array(
|
$configfilelib=array(
|
||||||
// 'separator',
|
// 'separator',
|
||||||
|
|||||||
@ -81,7 +81,8 @@ else
|
|||||||
{
|
{
|
||||||
if ($base == 1)
|
if ($base == 1)
|
||||||
{
|
{
|
||||||
print '<table class="noborder">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("TableName").'</td>';
|
print '<td>'.$langs->trans("TableName").'</td>';
|
||||||
print '<td colspan="2">'.$langs->trans("Type").'</td>';
|
print '<td colspan="2">'.$langs->trans("Type").'</td>';
|
||||||
@ -134,11 +135,13 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($base == 2)
|
if ($base == 2)
|
||||||
{
|
{
|
||||||
print '<table class="noborder">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("TableName").'</td>';
|
print '<td>'.$langs->trans("TableName").'</td>';
|
||||||
print '<td>Nb of tuples</td>';
|
print '<td>Nb of tuples</td>';
|
||||||
@ -173,12 +176,14 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($base == 4)
|
if ($base == 4)
|
||||||
{
|
{
|
||||||
// Sqlite by PDO or by Sqlite3
|
// Sqlite by PDO or by Sqlite3
|
||||||
print '<table class="noborder">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("TableName").'</td>';
|
print '<td>'.$langs->trans("TableName").'</td>';
|
||||||
print '<td>'.$langs->trans("NbOfRecord").'</td>';
|
print '<td>'.$langs->trans("NbOfRecord").'</td>';
|
||||||
@ -207,6 +212,8 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -42,6 +42,7 @@ llxHeader();
|
|||||||
print load_fiche_titre($langs->trans("InfoDatabase"),'','title_setup');
|
print load_fiche_titre($langs->trans("InfoDatabase"),'','title_setup');
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Database").'</td></tr>'."\n";
|
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Database").'</td></tr>'."\n";
|
||||||
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Version").'</td><td>'.$db::LABEL.' '.$db->getVersion().'</td></tr>'."\n";
|
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Version").'</td><td>'.$db::LABEL.' '.$db->getVersion().'</td></tr>'."\n";
|
||||||
@ -54,14 +55,16 @@ print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Password").'</td><td>'.pr
|
|||||||
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("DBStoringCharset").'</td><td>'.$db->getDefaultCharacterSetDatabase().'</td></tr>'."\n";
|
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("DBStoringCharset").'</td><td>'.$db->getDefaultCharacterSetDatabase().'</td></tr>'."\n";
|
||||||
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("DBSortingCharset").'</td><td>'.$db->getDefaultCollationDatabase().'</td></tr>'."\n";
|
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("DBSortingCharset").'</td><td>'.$db->getDefaultCollationDatabase().'</td></tr>'."\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
// Tables
|
// Tables
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Tables").'</td></tr>'."\n";
|
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Tables").'</td></tr>'."\n";
|
||||||
print '<tr '.$bc[0].'><td width="300"><a href="'.DOL_URL_ROOT.'/admin/system/database-tables.php?mainmenu=home">'.$langs->trans("List").'</a></td></tr>'."\n";
|
print '<tr '.$bc[0].'><td width="300"><a href="'.DOL_URL_ROOT.'/admin/system/database-tables.php?mainmenu=home">'.$langs->trans("List").'</a></td></tr>'."\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
$listofvars=$db->getServerParametersValues();
|
$listofvars=$db->getServerParametersValues();
|
||||||
$listofstatus=$db->getServerStatusValues();
|
$listofstatus=$db->getServerStatusValues();
|
||||||
@ -76,6 +79,7 @@ else
|
|||||||
foreach($arraylist as $listname)
|
foreach($arraylist as $listname)
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="300">'.$langs->trans("Parameters").'</td>';
|
print '<td width="300">'.$langs->trans("Parameters").'</td>';
|
||||||
@ -120,6 +124,7 @@ else
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,6 +48,7 @@ print load_fiche_titre($title,'','title_setup');
|
|||||||
|
|
||||||
// Version
|
// Version
|
||||||
$var=true;
|
$var=true;
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -69,10 +70,12 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Session
|
// Session
|
||||||
$var=true;
|
$var=true;
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Session").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Session").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -107,6 +110,7 @@ foreach($_SESSION as $key => $val)
|
|||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
@ -116,6 +120,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
|||||||
$shmoparray=dol_listshmop();
|
$shmoparray=dol_listshmop();
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="titlefield">'.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").'</td>';
|
print '<td class="titlefield">'.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").'</td>';
|
||||||
@ -133,12 +138,14 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Localisation
|
// Localisation
|
||||||
$var=true;
|
$var=true;
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("LocalisationDolibarrParameters").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("LocalisationDolibarrParameters").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -234,6 +241,7 @@ if (! empty($conf->global->MAIN_FILESYSTEM_ENCODING)) $tmp=$conf->global->MAIN_F
|
|||||||
print '<tr '.$bc[$var].'><td> => '.$langs->trans("File encoding").'</td><td>'.$tmp.'</td></tr>'."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
print '<tr '.$bc[$var].'><td> => '.$langs->trans("File encoding").'</td><td>'.$tmp.'</td></tr>'."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
@ -286,11 +294,13 @@ $configfileparameters=array(
|
|||||||
'separator4' => '',
|
'separator4' => '',
|
||||||
'dolibarr_main_prod' => 'Production mode (Hide all error messages)',
|
'dolibarr_main_prod' => 'Production mode (Hide all error messages)',
|
||||||
'?dolibarr_mailing_limit_sendbyweb' => 'Limit nb of email sent by page',
|
'?dolibarr_mailing_limit_sendbyweb' => 'Limit nb of email sent by page',
|
||||||
'?dolibarr_strict_mode' => 'Strict mode is on/off',
|
'?dolibarr_mailing_limit_sendbycli' => 'Limit nb of email sent by cli',
|
||||||
|
'?dolibarr_strict_mode' => 'Strict mode is on/off',
|
||||||
'?dolibarr_pdf_force_fpdf' => 'Force fpdf usage to generate PDF'
|
'?dolibarr_pdf_force_fpdf' => 'Force fpdf usage to generate PDF'
|
||||||
);
|
);
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="titlefield">'.$langs->trans("Parameters").' ';
|
print '<td class="titlefield">'.$langs->trans("Parameters").' ';
|
||||||
@ -352,11 +362,13 @@ foreach($configfileparameters as $key => $value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Parameters in database
|
// Parameters in database
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="titlefield">'.$langs->trans("Parameters").' '.$langs->trans("Database").'</td>';
|
print '<td class="titlefield">'.$langs->trans("Parameters").' '.$langs->trans("Database").'</td>';
|
||||||
@ -406,7 +418,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -75,33 +75,40 @@ $file_list = array('missing' => array(), 'updated' => array());
|
|||||||
|
|
||||||
// File to analyze
|
// File to analyze
|
||||||
//$xmlfile = DOL_DOCUMENT_ROOT.'/install/filelist-'.DOL_VERSION.'.xml';
|
//$xmlfile = DOL_DOCUMENT_ROOT.'/install/filelist-'.DOL_VERSION.'.xml';
|
||||||
$xmlshortfile = '/install/filelist-'.DOL_VERSION.'.xml';
|
$xmlshortfile = GETPOST('xmlshortfile')?GETPOST('xmlshortfile'):'/install/filelist-'.DOL_VERSION.'.xml';
|
||||||
$xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile;
|
$xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile;
|
||||||
$xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
|
$xmlremote = GETPOST('xmlremote')?GETPOST('xmlremote'):'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
|
||||||
|
|
||||||
|
|
||||||
// Test if remote test is ok
|
// Test if remote test is ok
|
||||||
$enableremotecheck = True;
|
$enableremotecheck = True;
|
||||||
if (preg_match('/beta|alpha/i', DOL_VERSION)) $enableremotecheck=False;
|
if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || ! empty($conf->global->MAIN_ALLOW_INTEGRITY_CHECK_ON_UNSTABLE)) $enableremotecheck=False;
|
||||||
|
$enableremotecheck = true;
|
||||||
|
|
||||||
print '<form name="check" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="check" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print $langs->trans("MakeIntegrityAnalysisFrom").':<br>';
|
print $langs->trans("MakeIntegrityAnalysisFrom").':<br>';
|
||||||
|
print '<!-- for a local check target=local&xmlshortfile=... -->'."\n";
|
||||||
if (dol_is_file($xmlfile))
|
if (dol_is_file($xmlfile))
|
||||||
{
|
{
|
||||||
print '<input type="radio" name="target" value="local"'.((! GETPOST('target') || GETPOST('target') == 'local') ? 'checked="checked"':'').'"> '.$langs->trans("LocalSignature").' = '.$xmlshortfile.'<br>';
|
print '<input type="radio" name="target" value="local"'.((! GETPOST('target') || GETPOST('target') == 'local') ? 'checked="checked"':'').'"> '.$langs->trans("LocalSignature").' = '.$xmlshortfile.'<br>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input type="radio" name="target" value="local"> '.$langs->trans("LocalSignature").' = '.$xmlshortfile.' <span class="warning">('.$langs->trans("AvailableOnlyOnPackagedVersions").')</span><br>';
|
print '<input type="radio" name="target" value="local"> '.$langs->trans("LocalSignature").' = '.$xmlshortfile;
|
||||||
|
if (! GETPOST('xmlshortfile')) print ' <span class="warning">('.$langs->trans("AvailableOnlyOnPackagedVersions").')</span>';
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
print '<!-- for a remote target=remote&xmlremote=... -->'."\n";
|
||||||
if ($enableremotecheck)
|
if ($enableremotecheck)
|
||||||
{
|
{
|
||||||
print '<input type="radio" name="target" value="remote"'.(GETPOST('target') == 'remote' ? 'checked="checked"':'').'> '.$langs->trans("RemoteSignature").' = '.$xmlremote.'<br>';
|
print '<input type="radio" name="target" value="remote"'.(GETPOST('target') == 'remote' ? 'checked="checked"':'').'> '.$langs->trans("RemoteSignature").' = ';
|
||||||
|
print '<input name="xmlremote" class="flat quatrevingtpercent" value="'.$xmlremote.'"><br>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input type="radio" name="target" value="remote" disabled="disabled"> '.$langs->trans("RemoteSignature").' = '.$xmlremote.' <span class="warning">('.$langs->trans("FeatureAvailableOnlyOnStable").')</span><br>';
|
print '<input type="radio" name="target" value="remote" disabled="disabled"> '.$langs->trans("RemoteSignature").' = '.$xmlremote;
|
||||||
|
if (! GETPOST('xmlremote')) print ' <span class="warning">('.$langs->trans("FeatureAvailableOnlyOnStable").')</span>';
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '<br><div class="center"><input type="submit" name="check" class="button" value="'.$langs->trans("Check").'"></div>';
|
print '<br><div class="center"><input type="submit" name="check" class="button" value="'.$langs->trans("Check").'"></div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
@ -128,7 +135,8 @@ if (GETPOST('target') == 'remote')
|
|||||||
if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404')
|
if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404')
|
||||||
{
|
{
|
||||||
$xmlfile = $xmlarray['content'];
|
$xmlfile = $xmlarray['content'];
|
||||||
$xml = simplexml_load_file($xmlfile);
|
//print "eee".$xmlfile."eee";
|
||||||
|
$xml = simplexml_load_string($xmlfile);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -141,24 +149,33 @@ if (GETPOST('target') == 'remote')
|
|||||||
|
|
||||||
if ($xml)
|
if ($xml)
|
||||||
{
|
{
|
||||||
|
$checksumconcat = array();
|
||||||
|
|
||||||
|
// Scan htdocs
|
||||||
if (is_object($xml->dolibarr_htdocs_dir[0]))
|
if (is_object($xml->dolibarr_htdocs_dir[0]))
|
||||||
{
|
{
|
||||||
$file_list = array();
|
$file_list = array();
|
||||||
$ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0]); // Fill array $file_list
|
$ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', DOL_DOCUMENT_ROOT, $checksumconcat); // Fill array $file_list
|
||||||
|
|
||||||
|
print_fiche_titre($langs->trans("FilesMissing"));
|
||||||
|
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>' . $langs->trans("FilesMissing") . '</td>';
|
print '<td>#</td>';
|
||||||
|
print '<td>' . $langs->trans("Filename") . '</td>';
|
||||||
print '<td align="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
print '<td align="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$var = true;
|
$var = true;
|
||||||
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
|
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
|
||||||
if (is_array($tmpfilelist) && count($tmpfilelist))
|
if (is_array($tmpfilelist) && count($tmpfilelist))
|
||||||
{
|
{
|
||||||
|
$i = 0;
|
||||||
foreach ($tmpfilelist as $file)
|
foreach ($tmpfilelist as $file)
|
||||||
{
|
{
|
||||||
|
$i++;
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
print '<tr ' . $bc[$var] . '>';
|
print '<tr ' . $bc[$var] . '>';
|
||||||
|
print '<td>'.$i.'</td>' . "\n";
|
||||||
print '<td>'.$file['filename'].'</td>' . "\n";
|
print '<td>'.$file['filename'].'</td>' . "\n";
|
||||||
print '<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
print '<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -166,28 +183,34 @@ if ($xml)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr ' . $bc[false] . '><td colspan="2" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
print '<tr ' . $bc[false] . '><td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print_fiche_titre($langs->trans("FilesUpdated"));
|
||||||
|
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>' . $langs->trans("FilesUpdated") . '</td>';
|
print '<td>#</td>';
|
||||||
|
print '<td>' . $langs->trans("Filename") . '</td>';
|
||||||
print '<td align="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
print '<td align="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
||||||
print '<td align="center">' . $langs->trans("CurrentChecksum") . '</td>';
|
print '<td align="center">' . $langs->trans("CurrentChecksum") . '</td>';
|
||||||
print '<td align="right">' . $langs->trans("Size") . '</td>';
|
print '<td align="right">' . $langs->trans("Size") . '</td>';
|
||||||
print '<td align="right">' . $langs->trans("DateModification") . '</td>';
|
print '<td align="right">' . $langs->trans("DateModification") . '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$var = true;
|
$var = true;
|
||||||
$tmpfilelist = dol_sort_array($file_list['updated'], 'filename');
|
$tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename');
|
||||||
if (is_array($tmpfilelist) && count($tmpfilelist))
|
if (is_array($tmpfilelist2) && count($tmpfilelist2))
|
||||||
{
|
{
|
||||||
foreach ($tmpfilelist as $file)
|
$i = 0;
|
||||||
|
foreach ($tmpfilelist2 as $file)
|
||||||
{
|
{
|
||||||
|
$i++;
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
print '<tr ' . $bc[$var] . '>';
|
print '<tr ' . $bc[$var] . '>';
|
||||||
|
print '<td>'.$i.'</td>' . "\n";
|
||||||
print '<td>'.$file['filename'].'</td>' . "\n";
|
print '<td>'.$file['filename'].'</td>' . "\n";
|
||||||
print '<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
print '<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||||
print '<td align="center">'.$file['md5'].'</td>' . "\n";
|
print '<td align="center">'.$file['md5'].'</td>' . "\n";
|
||||||
@ -201,12 +224,42 @@ if ($xml)
|
|||||||
print '<tr ' . $bc[false] . '><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
print '<tr ' . $bc[false] . '><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
if (empty($tmpfilelist) && empty($tmpfilelist2))
|
||||||
|
{
|
||||||
|
setEventMessage($langs->trans("FileIntegrityIsStrictlyConformedWithReference"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessage($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), 'warnings');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile;
|
print 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Scan scripts
|
||||||
|
/*
|
||||||
|
if (is_object($xml->dolibarr_script_dir[0]))
|
||||||
|
{
|
||||||
|
$file_list = array();
|
||||||
|
$ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', ???, $checksumconcat); // Fill array $file_list
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
asort($checksumconcat); // Sort list of checksum
|
||||||
|
//var_dump($checksumconcat);
|
||||||
|
$checksumget = md5(join(',',$checksumconcat));
|
||||||
|
$checksumtoget = $xml->dolibarr_htdocs_dir_checksum;
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print_fiche_titre($langs->trans("GlobalChecksum")).'<br>';
|
||||||
|
print $langs->trans("ExpectedChecksum").' = '. ($checksumtoget ? $checksumtoget : $langs->trans("Unknown")) .'<br>';
|
||||||
|
print $langs->trans("CurrentChecksum").' = '.$checksumget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -223,12 +276,14 @@ exit($error);
|
|||||||
* Function to get list of updated or modified files.
|
* Function to get list of updated or modified files.
|
||||||
* $file_list is used as global variable
|
* $file_list is used as global variable
|
||||||
*
|
*
|
||||||
* @param array $file_list Array for response
|
* @param array $file_list Array for response
|
||||||
* @param SimpleXMLElement $dir SimpleXMLElement of files to test
|
* @param SimpleXMLElement $dir SimpleXMLElement of files to test
|
||||||
* @param string $path Path of file
|
* @param string $path Path of files relative to $pathref. We start with ''. Used by recursive calls.
|
||||||
* @return array Array of filenames
|
* @param string $pathref Path ref (DOL_DOCUMENT_ROOT)
|
||||||
|
* @param array $checksumconcat Array of checksum
|
||||||
|
* @return array Array of filenames
|
||||||
*/
|
*/
|
||||||
function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '')
|
function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathref = '', &$checksumconcat = array())
|
||||||
{
|
{
|
||||||
$exclude = 'install';
|
$exclude = 'install';
|
||||||
|
|
||||||
@ -236,20 +291,21 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '')
|
|||||||
{
|
{
|
||||||
$filename = $path.$file['name'];
|
$filename = $path.$file['name'];
|
||||||
|
|
||||||
if (preg_match('#'.$exclude.'#', $filename)) continue;
|
//if (preg_match('#'.$exclude.'#', $filename)) continue;
|
||||||
|
|
||||||
if (!file_exists(DOL_DOCUMENT_ROOT.'/'.$filename))
|
if (!file_exists($pathref.'/'.$filename))
|
||||||
{
|
{
|
||||||
$file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>(string) $file);
|
$file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>(string) $file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$md5_local = md5_file(DOL_DOCUMENT_ROOT.'/'.$filename);
|
$md5_local = md5_file($pathref.'/'.$filename);
|
||||||
if ($md5_local != (string) $file) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>(string) $file, 'md5'=>(string) $md5_local);
|
if ($md5_local != (string) $file) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>(string) $file, 'md5'=>(string) $md5_local);
|
||||||
}
|
$checksumconcat[] = $md5_local;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($dir->dir as $subdir) getFilesUpdated($file_list, $subdir, $path.$subdir['name'].'/');
|
foreach ($dir->dir as $subdir) getFilesUpdated($file_list, $subdir, $path.$subdir['name'].'/', $pathref, $checksumconcat);
|
||||||
|
|
||||||
return $file_list;
|
return $file_list;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -102,6 +102,8 @@ foreach($modulesdir as $dir)
|
|||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Modules").'</td>';
|
print '<td>'.$langs->trans("Modules").'</td>';
|
||||||
@ -148,6 +150,7 @@ foreach($sortorder as $numero=>$name)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
sort($rights_ids);
|
sort($rights_ids);
|
||||||
$old='';
|
$old='';
|
||||||
|
|||||||
@ -68,8 +68,8 @@ print '<br>';
|
|||||||
$phparray=phpinfo_array();
|
$phparray=phpinfo_array();
|
||||||
foreach($phparray as $key => $value)
|
foreach($phparray as $key => $value)
|
||||||
{
|
{
|
||||||
//print load_fiche_titre($key);
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
//print '<td width="220px">'.$langs->trans("Parameter").'</td>';
|
//print '<td width="220px">'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td width="220px">'.$key.'</td>';
|
print '<td width="220px">'.$key.'</td>';
|
||||||
@ -114,7 +114,9 @@ foreach($phparray as $key => $value)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table><br>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
|
|||||||
?>
|
?>
|
||||||
<table class="centpercent">
|
<table class="centpercent">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top">
|
<td class="tdtop">
|
||||||
|
|
||||||
<div id="div_container_exportoptions">
|
<div id="div_container_exportoptions">
|
||||||
<fieldset id="exportoptions"><legend><?php echo $langs->trans("ExportMethod"); ?></legend>
|
<fieldset id="exportoptions"><legend><?php echo $langs->trans("ExportMethod"); ?></legend>
|
||||||
@ -179,7 +179,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">
|
<td class="tdtop">
|
||||||
|
|
||||||
|
|
||||||
<div id="div_container_sub_exportoptions">
|
<div id="div_container_sub_exportoptions">
|
||||||
|
|||||||
@ -86,7 +86,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
|
|||||||
|
|
||||||
<?php print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b>'; ?><br><br>
|
<?php print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b>'; ?><br><br>
|
||||||
|
|
||||||
<table><tr><td valign="top">
|
<table><tr><td class="tdtop">
|
||||||
|
|
||||||
<?php if ($conf->use_javascript_ajax) { ?>
|
<?php if ($conf->use_javascript_ajax) { ?>
|
||||||
<div id="div_container_exportoptions">
|
<div id="div_container_exportoptions">
|
||||||
@ -120,7 +120,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
|
|||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</td><td valign="top">
|
</td><td class="tdtop">
|
||||||
|
|
||||||
|
|
||||||
<div id="div_container_sub_exportoptions">
|
<div id="div_container_sub_exportoptions">
|
||||||
|
|||||||
@ -289,7 +289,7 @@ function backup_tables($outputfile, $tables='*')
|
|||||||
|
|
||||||
// Print headers and global mysql config vars
|
// Print headers and global mysql config vars
|
||||||
$sqlhead = '';
|
$sqlhead = '';
|
||||||
$sqlhead .= "-- ".$db::LABEL." dump via php
|
$sqlhead .= "-- ".$db::LABEL." dump via php with Dolibarr ".DOL_VERSION."
|
||||||
--
|
--
|
||||||
-- Host: ".$db->db->host_info." Database: ".$db->database_name."
|
-- Host: ".$db->db->host_info." Database: ".$db->database_name."
|
||||||
-- ------------------------------------------------------
|
-- ------------------------------------------------------
|
||||||
|
|||||||
@ -174,6 +174,15 @@ if ($search_user) { $usefilter++; $sql.=natural_search("u.login", $search_user,
|
|||||||
if ($search_desc) { $usefilter++; $sql.=natural_search("e.description", $search_desc, 0); }
|
if ($search_desc) { $usefilter++; $sql.=natural_search("e.description", $search_desc, 0); }
|
||||||
if ($search_ua) { $usefilter++; $sql.=natural_search("e.user_agent", $search_ua, 0); }
|
if ($search_ua) { $usefilter++; $sql.=natural_search("e.user_agent", $search_ua, 0); }
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
|
// Count total nb of records
|
||||||
|
$nbtotalofrecords = '';
|
||||||
|
/*if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}*/
|
||||||
|
|
||||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||||
//print $sql;
|
//print $sql;
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -195,7 +204,7 @@ if ($result)
|
|||||||
$center='<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=purge">'.$langs->trans("Purge").'</a>';
|
$center='<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=purge">'.$langs->trans("Purge").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ListOfSecurityEvents").' ('.$num.')', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, 0, 'setup');
|
print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup');
|
||||||
|
|
||||||
if ($action == 'purge')
|
if ($action == 'purge')
|
||||||
{
|
{
|
||||||
@ -204,6 +213,8 @@ if ($result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"e.dateevent","","",'align="left"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"e.dateevent","","",'align="left"',$sortfield,$sortorder);
|
||||||
@ -303,7 +314,10 @@ if ($result)
|
|||||||
if ($usefilter) print '<tr><td colspan="6">'.$langs->trans("NoEventFoundWithCriteria").'</td></tr>';
|
if ($usefilter) print '<tr><td colspan="6">'.$langs->trans("NoEventFoundWithCriteria").'</td></tr>';
|
||||||
else print '<tr><td colspan="6">'.$langs->trans("NoEventOrNoAuditSetup").'</td></tr>';
|
else print '<tr><td colspan="6">'.$langs->trans("NoEventOrNoAuditSetup").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table></form>";
|
print "</table>";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
|
print "</form>";
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -39,7 +39,7 @@ if (GETPOST('msg','alpha')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$urldolibarr='http://www.dolibarr.org/downloads/';
|
$urldolibarr='https://www.dolibarr.org/downloads/';
|
||||||
$urldolibarrmodules='https://www.dolistore.com/';
|
$urldolibarrmodules='https://www.dolistore.com/';
|
||||||
$urldolibarrthemes='https://www.dolistore.com/';
|
$urldolibarrthemes='https://www.dolistore.com/';
|
||||||
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
||||||
|
|||||||
@ -105,7 +105,7 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update'))
|
|||||||
}
|
}
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue) VALUE ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."')";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."')";
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -52,6 +52,7 @@ $template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/';
|
|||||||
$interfaces = new Interfaces($db);
|
$interfaces = new Interfaces($db);
|
||||||
$triggers = $interfaces->getTriggersList();
|
$triggers = $interfaces->getTriggersList();
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder">
|
print '<table class="noborder">
|
||||||
<tr class="liste_titre">
|
<tr class="liste_titre">
|
||||||
<td colspan="2">'.$langs->trans("File").'</td>
|
<td colspan="2">'.$langs->trans("File").'</td>
|
||||||
@ -66,9 +67,9 @@ foreach ($triggers as $trigger)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
|
print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
|
||||||
print '<td valign="top">'.$trigger['file'].'</td>';
|
print '<td class="tdtop">'.$trigger['file'].'</td>';
|
||||||
print '<td valign="top" align="center">'.$trigger['status'].'</td>';
|
print '<td valign="top" align="center">'.$trigger['status'].'</td>';
|
||||||
print '<td valign="top">';
|
print '<td class="tdtop">';
|
||||||
$text=$trigger['info'];
|
$text=$trigger['info'];
|
||||||
$text.="<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
|
$text.="<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
|
||||||
//$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
|
//$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
|
||||||
@ -78,6 +79,7 @@ foreach ($triggers as $trigger)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -81,9 +81,6 @@ class 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
|
||||||
*
|
|
||||||
* @todo use an array for properties to clean
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function _cleanObjectDatas($object) {
|
function _cleanObjectDatas($object) {
|
||||||
|
|
||||||
@ -93,13 +90,39 @@ class DolibarrApi
|
|||||||
// Remove linkedObjects. We should already have linkedObjectIds that avoid huge responses
|
// Remove linkedObjects. We should already have linkedObjectIds that avoid huge responses
|
||||||
unset($object->linkedObjects);
|
unset($object->linkedObjects);
|
||||||
|
|
||||||
unset($object->lignes); // should be lines
|
unset($object->lignes); // should be ->lines
|
||||||
|
unset($object->oldline);
|
||||||
|
|
||||||
|
unset($object->error);
|
||||||
|
unset($object->errors);
|
||||||
|
|
||||||
|
unset($object->ref_previous);
|
||||||
|
unset($object->ref_next);
|
||||||
|
unset($object->ref_int);
|
||||||
|
|
||||||
|
unset($object->projet); // Should be fk_project
|
||||||
|
unset($object->project); // Should be fk_project
|
||||||
|
unset($object->author); // Should be fk_user_author
|
||||||
|
unset($object->timespent_old_duration);
|
||||||
|
unset($object->timespent_id);
|
||||||
|
unset($object->timespent_duration);
|
||||||
|
unset($object->timespent_date);
|
||||||
|
unset($object->timespent_datehour);
|
||||||
|
unset($object->timespent_withhour);
|
||||||
|
unset($object->timespent_fk_user);
|
||||||
|
unset($object->timespent_note);
|
||||||
|
|
||||||
unset($object->statuts);
|
unset($object->statuts);
|
||||||
unset($object->statuts_short);
|
unset($object->statuts_short);
|
||||||
unset($object->statuts_logo);
|
unset($object->statuts_logo);
|
||||||
unset($object->statuts_long);
|
unset($object->statuts_long);
|
||||||
|
|
||||||
|
unset($object->element);
|
||||||
|
unset($object->fk_element);
|
||||||
|
unset($object->table_element);
|
||||||
|
unset($object->table_element_line);
|
||||||
|
unset($object->picto);
|
||||||
|
|
||||||
// Remove the $oldcopy property because it is not supported by the JSON
|
// Remove the $oldcopy property because it is not supported by the JSON
|
||||||
// encoder. The following error is generated when trying to serialize
|
// encoder. The following error is generated when trying to serialize
|
||||||
// it: "Error encoding/decoding JSON: Type is not supported"
|
// it: "Error encoding/decoding JSON: Type is not supported"
|
||||||
|
|||||||
@ -76,12 +76,34 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
|
|
||||||
$userClass = Defaults::$userIdentifierClass;
|
$userClass = Defaults::$userIdentifierClass;
|
||||||
|
|
||||||
|
/*foreach ($_SERVER as $key => $val)
|
||||||
|
{
|
||||||
|
dol_syslog($key.' - '.$val);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
// api key can be provided in url with parameter api_key=xxx or ni header with header DOLAPIKEY:xxx
|
||||||
|
$api_key = '';
|
||||||
if (isset($_GET['api_key']))
|
if (isset($_GET['api_key']))
|
||||||
|
{
|
||||||
|
// TODO Add option to disable use of api key on url. Return errors if used.
|
||||||
|
$api_key = $_GET['api_key']; // For backward compatibility
|
||||||
|
}
|
||||||
|
if (isset($_GET['DOLAPIKEY']))
|
||||||
|
{
|
||||||
|
// TODO Add option to disable use of api key on url. Return errors if used.
|
||||||
|
$api_key = $_GET['DOLAPIKEY']; // With GET method
|
||||||
|
}
|
||||||
|
if (isset($_SERVER['HTTP_DOLAPIKEY']))
|
||||||
|
{
|
||||||
|
$api_key = $_SERVER['HTTP_DOLAPIKEY']; // With header method (recommanded)
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($api_key)
|
||||||
{
|
{
|
||||||
$sql = "SELECT u.login, u.datec, u.api_key, ";
|
$sql = "SELECT u.login, u.datec, u.api_key, ";
|
||||||
$sql.= " u.tms as date_modification, u.entity";
|
$sql.= " u.tms as date_modification, u.entity";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql.= " WHERE u.api_key = '".$db->escape($_GET['api_key'])."'";
|
$sql.= " WHERE u.api_key = '".$db->escape($api_key)."'";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -97,8 +119,8 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
throw new RestException(503, 'Error when fetching user api_key :'.$db->error_msg);
|
throw new RestException(503, 'Error when fetching user api_key :'.$db->error_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($stored_key != $_GET['api_key']) {
|
if ($stored_key != $api_key) {
|
||||||
$userClass::setCacheIdentifier($_GET['api_key']);
|
$userClass::setCacheIdentifier($api_key);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +143,7 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new RestException(401, "Failed to login to API. No parameter 'api_key' provided");
|
throw new RestException(401, "Failed to login to API. No parameter 'DOLAPIKEY' on HTTP header (neither in URL).");
|
||||||
}
|
}
|
||||||
|
|
||||||
$userClass::setCacheIdentifier(static::$role);
|
$userClass::setCacheIdentifier(static::$role);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user