Merge branch 'develop' into 10.0_intracommreport
This commit is contained in:
commit
abfb708044
11
COPYRIGHT
11
COPYRIGHT
@ -13,29 +13,28 @@ Component Version License GPL Compatible
|
||||
-------------------------------------------------------------------------------------
|
||||
PHP libraries:
|
||||
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console
|
||||
CKEditor 4.11.4 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
Mobiledetect 2.8.83 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
PSR/Logs 1.0 Library for logs (used by DebugBar)
|
||||
PSR/simple-cache Library for cache (used by PHPSpreadSheet)
|
||||
PSR/simple-cache ? Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
Sabre 3.2.2 BSD Yes DAV support
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 6.35 MIT licence Yes Library for Stripe module
|
||||
TCPDF 6.2.25 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 6.34.5 MIT licence Yes Library for Stripe module
|
||||
|
||||
JS libraries:
|
||||
jQuery 3.3.1 MIT License Yes JS library
|
||||
|
||||
26
ChangeLog
26
ChangeLog
@ -113,20 +113,22 @@ NEW: Widget birthdays of the month.
|
||||
NEW: Option in workflow module to set a reception billed on validate supplier bill.
|
||||
NEW: Autocompletion on lists should be available on mobile applications.
|
||||
NEW: Add mass action to close several members.
|
||||
NEW: Add hidden option ADD_UNSPLASH_LOGIN_BACKGROUND for random background
|
||||
|
||||
For Developers:
|
||||
NEW: Module "DebugBar" is available as a stable module.
|
||||
NEW: Add API REST for donations
|
||||
NEW: Add a script 'purge-data.php' to purge data older than a defined creation date
|
||||
NEW: Add constant XFRAMEOPTIONS_ALLOWALL
|
||||
NEW: Add function isValidVATID()
|
||||
NEW: ADD document's product support in APIs
|
||||
NEW: REST API: get the list of objects in a category.
|
||||
NEW: Add function isValidVATID() to heck syntax of a VAT ID/number.
|
||||
NEW: Add document's product support in APIs
|
||||
NEW: Add REST API: get the list of objects in a category.
|
||||
NEW: Update Stripe library to 6.35
|
||||
NEW: Upgrade jquery lib to 3.3.1
|
||||
NEW: Add hook 'addHtmlHeader()'
|
||||
NEW: Add hook 'createRecurringInvoices()'
|
||||
NEW: Add hook 'afterSelectContactOptions'
|
||||
NEW: Add hook 'getAccessForbiddenMessage'
|
||||
NEW: Add hook support in accountancy index
|
||||
NEW: Add hook support in list of template invoices
|
||||
NEW: Add parameter 'replaceambiguouschars' on getRandomPassword function
|
||||
@ -135,22 +137,21 @@ NEW: Add the current modulepart into the Conf class object
|
||||
NEW: Add trigger FICHINTER_UNVALIDATE
|
||||
NEW: Add visibility with value 4 in framework to define fields to show
|
||||
NEW: More option to tune initialization of a new module with modulebuilder.
|
||||
NEW: API to list currencies
|
||||
NEW: API Proposal, Orders, Invoices: Add contact details
|
||||
NEW: hidden option to change concat desc order
|
||||
NEW: Add REST API to list currencies
|
||||
NEW: REST API Proposal, Orders, Invoices: Add contact details
|
||||
NEW: hidden option to change concat order of description/product label.
|
||||
NEW: Enhance management of webhooks
|
||||
NEW: Generation of doc by modulebuilder can include README and CHANGELOG
|
||||
NEW: massfilesarea feature for external modules
|
||||
NEW: Show enabled modules in dol_print_error()
|
||||
NEW: massfilesarea feature is possible for external modules
|
||||
NEW: Show list of enabled modules in dol_print_error().
|
||||
NEW: Simplification of CSS styles of default themes.
|
||||
NEW: Clean code of a lot of deprecated code.
|
||||
NEW: Add hidden option to set a search entry to the top
|
||||
NEW: add hidden option DISPLAY_DISCOUNTED_SUPPLIER_PRICE
|
||||
NEW: add hidden option MAIN_DEFAULT_LANGUAGE_FILTER
|
||||
NEW: add hidden option NO_CONCAT_DESCRIPTION
|
||||
NEW: Add hidden option for ACCOUNTANCY_COMBO_FOR_AUX
|
||||
NEW: Add hidden option 'ADD_UNSPLASH_LOGIN_BACKGROUND'
|
||||
NEW: Add Hidden option 'OVERRIDE_VAT_FOR_EXPENSE_REPORT'
|
||||
NEW: Add hidden option ACCOUNTANCY_COMBO_FOR_AUX
|
||||
NEW: Add Hidden option OVERRIDE_VAT_FOR_EXPENSE_REPORT
|
||||
NEW: add hidden option MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT
|
||||
NEW: Hidden conf to improve pdf desc item visibitity
|
||||
NEW: Look and feel v10 - Add CSS 'tabBarNoTop'
|
||||
@ -176,6 +177,9 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Deprecated property ->fk_departement is now ->state_id everywhere.
|
||||
* Removed the method 4 of GETPOST (to get $_COOKIE). It was not used and not recommanded to use in Dolibarr.
|
||||
* Column llx_facture.facnumber change to llx_facture.ref
|
||||
* Variable $dolibarr_main_cookie_cryptkey is no more created at install (it was not used by Dolibarr). A new variable
|
||||
called $dolibarr_main_instance_unique_id is now generated at each installation. It will be used by some future features.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 9.0.3 compared to 9.0.2 *****
|
||||
|
||||
@ -1002,7 +1002,7 @@ if ($nboftargetok) {
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
|
||||
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/myobject.php`;
|
||||
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/mymodule.php`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";
|
||||
|
||||
@ -165,6 +165,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
@ -179,6 +180,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
@ -201,6 +203,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/modulebuilder
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
@ -209,6 +212,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/societe
|
||||
%_datadir/dolibarr/htdocs/stripe
|
||||
|
||||
@ -245,6 +245,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
@ -259,6 +260,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
@ -281,6 +283,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/modulebuilder
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
@ -289,6 +292,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/societe
|
||||
%_datadir/dolibarr/htdocs/stripe
|
||||
|
||||
@ -162,6 +162,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
@ -176,6 +177,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
@ -198,6 +200,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/modulebuilder
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
@ -206,6 +209,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/societe
|
||||
%_datadir/dolibarr/htdocs/stripe
|
||||
|
||||
@ -173,6 +173,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
@ -187,6 +188,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
@ -209,6 +211,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/modulebuilder
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
@ -217,6 +220,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/societe
|
||||
%_datadir/dolibarr/htdocs/stripe
|
||||
|
||||
11250
dev/initdemo/mysqldump_dolibarr_10.0.0.sql
Normal file
11250
dev/initdemo/mysqldump_dolibarr_10.0.0.sql
Normal file
File diff suppressed because one or more lines are too long
@ -176,10 +176,61 @@ export list="
|
||||
--ignore-table=$base.llx_advanced_extrafields
|
||||
--ignore-table=$base.llx_advanced_extrafields_options
|
||||
--ignore-table=$base.llx_advanced_extrafields_values
|
||||
--ignore-table=$base.llx_agefodd_calendrier
|
||||
--ignore-table=$base.llx_agefodd_certif_state
|
||||
--ignore-table=$base.llx_agefodd_certificate_type
|
||||
--ignore-table=$base.llx_agefodd_contact
|
||||
--ignore-table=$base.llx_agefodd_convention
|
||||
--ignore-table=$base.llx_agefodd_convention_stagiaire
|
||||
--ignore-table=$base.llx_agefodd_cursus
|
||||
--ignore-table=$base.llx_agefodd_cursus_extrafields
|
||||
--ignore-table=$base.llx_agefodd_formateur
|
||||
--ignore-table=$base.llx_agefodd_formateur_category
|
||||
--ignore-table=$base.llx_agefodd_formateur_category_dict
|
||||
--ignore-table=$base.llx_agefodd_formateur_training
|
||||
--ignore-table=$base.llx_agefodd_formateur_type
|
||||
--ignore-table=$base.llx_agefodd_formation_catalogue
|
||||
--ignore-table=$base.llx_agefodd_formation_catalogue_extrafields
|
||||
--ignore-table=$base.llx_agefodd_formation_catalogue_modules
|
||||
--ignore-table=$base.llx_agefodd_formation_catalogue_type
|
||||
--ignore-table=$base.llx_agefodd_formation_catalogue_type_bpf
|
||||
--ignore-table=$base.llx_agefodd_formation_cursus
|
||||
--ignore-table=$base.llx_agefodd_formation_objectifs_peda
|
||||
--ignore-table=$base.llx_agefodd_opca
|
||||
--ignore-table=$base.llx_agefodd_place
|
||||
--ignore-table=$base.llx_agefodd_reg_interieur
|
||||
--ignore-table=$base.llx_agefodd_session
|
||||
--ignore-table=$base.llx_agefodd_session_adminsitu
|
||||
--ignore-table=$base.llx_agefodd_session_admlevel
|
||||
--ignore-table=$base.llx_agefodd_session_calendrier
|
||||
--ignore-table=$base.llx_agefodd_session_commercial
|
||||
--ignore-table=$base.llx_agefodd_session_contact
|
||||
--ignore-table=$base.llx_agefodd_session_element
|
||||
--ignore-table=$base.llx_agefodd_session_extrafields
|
||||
--ignore-table=$base.llx_agefodd_session_formateur
|
||||
--ignore-table=$base.llx_agefodd_session_formateur_calendrier
|
||||
--ignore-table=$base.llx_agefodd_session_stagiaire
|
||||
--ignore-table=$base.llx_agefodd_session_stagiaire_heures
|
||||
--ignore-table=$base.llx_agefodd_session_status_type
|
||||
--ignore-table=$base.llx_agefodd_stagiaire
|
||||
--ignore-table=$base.llx_agefodd_stagiaire_certif
|
||||
--ignore-table=$base.llx_agefodd_stagiaire_cursus
|
||||
--ignore-table=$base.llx_agefodd_stagiaire_extrafields
|
||||
--ignore-table=$base.llx_agefodd_stagiaire_type
|
||||
--ignore-table=$base.llx_agefodd_training_admlevel
|
||||
--ignore-table=$base.llx_askpricesupplier
|
||||
--ignore-table=$base.llx_askpricesupplier_extrafields
|
||||
--ignore-table=$base.llx_askpricesupplierdet
|
||||
--ignore-table=$base.llx_askpricesupplierdet_extrafields
|
||||
--ignore-table=$base.llx_assetOf
|
||||
--ignore-table=$base.llx_assetOf_line
|
||||
--ignore-table=$base.llx_asset_workstation_of
|
||||
--ignore-table=$base.llx_asset_workstation_product
|
||||
--ignore-table=$base.llx_asset_workstation_task
|
||||
--ignore-table=$base.llx_assetof_amounts
|
||||
--ignore-table=$base.llx_asset_workstation_of
|
||||
--ignore-table=$base.llx_asset_workstation_of
|
||||
--ignore-table=$base.llx_asset_workstation_of
|
||||
--ignore-table=$base.llx_bookkeeping
|
||||
--ignore-table=$base.llx_bootstrap
|
||||
--ignore-table=$base.llx_bt_namemap
|
||||
@ -226,15 +277,28 @@ export list="
|
||||
--ignore-table=$base.llx_ecommerce_site
|
||||
--ignore-table=$base.llx_ecommerce_societe
|
||||
--ignore-table=$base.llx_ecommerce_socpeople
|
||||
--ignore-table=$base.llx_element_rang
|
||||
--ignore-table=$base.llx_element_rang
|
||||
--ignore-table=$base.llx_element_tag
|
||||
--ignore-table=$base.llx_eleves
|
||||
--ignore-table=$base.llx_eleves_extrafields
|
||||
--ignore-table=$base.llx_entity
|
||||
--ignore-table=$base.llx_entity_extrafields
|
||||
--ignore-table=$base.llx_entity_thirdparty
|
||||
--ignore-table=$base.llx_equipement_factory
|
||||
--ignore-table=$base.llx_factory
|
||||
--ignore-table=$base.llx_factory_extrafields
|
||||
--ignore-table=$base.llx_factorydet
|
||||
--ignore-table=$base.llx_filemanager_roots
|
||||
--ignore-table=$base.llx_fournisseur_ca
|
||||
--ignore-table=$base.llx_google_maps
|
||||
--ignore-table=$base.llx_lead
|
||||
--ignore-table=$base.llx_lead_extrafields
|
||||
--ignore-table=$base.llx_milestone
|
||||
--ignore-table=$base.llx_milestone
|
||||
--ignore-table=$base.llx_monitoring_probes
|
||||
--ignore-table=$base.llx_m
|
||||
--ignore-table=$base.llx_m_extrafields
|
||||
--ignore-table=$base.llx_monmodule_abcdef
|
||||
--ignore-table=$base.llx_notes
|
||||
--ignore-table=$base.llx_pos_cash
|
||||
--ignore-table=$base.llx_pos_control_cash
|
||||
@ -256,6 +320,9 @@ export list="
|
||||
--ignore-table=$base.llx_ultimatepdf
|
||||
--ignore-table=$base.llx_update_modules
|
||||
--ignore-table=$base.llx_ventilation_achat
|
||||
--ignore-table=$base.tmp_llx_accouting_account
|
||||
--ignore-table=$base.tmp_llx_product_batch
|
||||
--ignore-table=$base.tmp_llx_product_batch2
|
||||
"
|
||||
echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile"
|
||||
mysqldump -P$port -u$admin $passwd $list $base > $mydir/$dumpfile
|
||||
|
||||
@ -75,10 +75,13 @@
|
||||
<!-- Warning if action on same line than if -->
|
||||
<!--
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure">
|
||||
<properties> <property name="error" value="false"/> </properties>
|
||||
<properties>
|
||||
<property name="error" value="false"/>
|
||||
</properties>
|
||||
</rule>
|
||||
-->
|
||||
|
||||
|
||||
<!-- PHP code MUST use only UTF-8 without BOM. -->
|
||||
<rule ref="Generic.Files.ByteOrderMark"/>
|
||||
|
||||
@ -97,8 +100,11 @@
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- To disallow several statements on same line -->
|
||||
<!-- <rule ref="Generic.Formatting.DisallowMultipleStatements" /> -->
|
||||
<!-- Disallow several statements on same line -->
|
||||
<!-- We want to allow 'if () { ...small code... }' on same line for better code compacity and readability -->
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- Have 2 chars padding maximum and always show as errors -->
|
||||
<!--
|
||||
@ -112,13 +118,17 @@
|
||||
<rule ref="Generic.Functions.CallTimePassByReference" />
|
||||
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
|
||||
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"> <!-- We don't want this rule, we want to be able to align params on several similare functions on different lines -->
|
||||
|
||||
<!-- Disallow several spaces after comma -->
|
||||
<!-- We want to allow this because we want to be able to align params on several similare functions on different lines -->
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
@ -152,7 +162,10 @@
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions" />
|
||||
|
||||
<!-- Warning when using @ before functions -->
|
||||
<!-- <rule ref="Generic.PHP.NoSilencedErrors" /> -->
|
||||
<!-- We want this. Some features need this -->
|
||||
<rule ref="Generic.PHP.NoSilencedErrors">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- Say if null, true, false must be uppercase (Rule 2.5 of PSR2 https://www.php-fig.org/psr/psr-2/) -->
|
||||
<rule ref="Generic.PHP.LowerCaseConstant" />
|
||||
@ -169,7 +182,16 @@
|
||||
<!-- Check indent are done with spaces and with correct number -->
|
||||
<!-- Disabled as this does not support tab -->
|
||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||
|
||||
<!-- TODO Enable this
|
||||
<arg name="tab-width" value="4"/>
|
||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||
<properties>
|
||||
<property name="indent" value="4"/>
|
||||
<property name="tabIndent" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
-->
|
||||
|
||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||
|
||||
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
||||
@ -310,22 +332,29 @@
|
||||
|
||||
<rule ref="PEAR.Commenting.InlineComment" />
|
||||
|
||||
<!-- <rule ref="PEAR.ControlStructures.ControlSignature" /> -->
|
||||
<!-- Check position of { after a control structure like if (), while (), etc... -->
|
||||
<!--
|
||||
<rule ref="PEAR.ControlStructures.ControlSignature" />
|
||||
-->
|
||||
|
||||
<!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> -->
|
||||
|
||||
<!-- Test if () are removed for includes -->
|
||||
<rule ref="PEAR.Files.IncludingFile" />
|
||||
|
||||
<!-- Disable some error messages that we do not want. -->
|
||||
|
||||
<rule ref="PEAR.Files.IncludingFile.UseInclude">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
|
||||
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Files.IncludingFile.UseRequire">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
|
||||
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@ -334,12 +363,15 @@
|
||||
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
||||
|
||||
<!-- TODO Enable this test. -->
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Enable this test. -->
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/account.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief List accounting account
|
||||
*/
|
||||
|
||||
@ -389,11 +389,11 @@ if ($resql)
|
||||
{
|
||||
print '<td>';
|
||||
if (empty($obj->active)) {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/accountmodel.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page to administer model of chart of accounts
|
||||
*/
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Card of accounting account
|
||||
*/
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/categories.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page to assign mass categories to accounts
|
||||
*/
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/closure.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Setup page to configure accounting expert module
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/defaultaccounts.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Setup page to configure accounting expert module
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/export.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Setup page to configure accounting expert module
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/fiscalyear.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Setup page to configure fiscal year
|
||||
*/
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/fiscalyear_card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page to show a fiscal year
|
||||
*/
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/fiscalyear_info.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page to show info of a fiscal year
|
||||
*/
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/index.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Setup page to configure accounting expert module
|
||||
*/
|
||||
|
||||
@ -214,11 +214,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@ -227,11 +227,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@ -240,11 +240,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@ -253,11 +253,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@ -266,11 +266,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTANCY_COMBO_FOR_AUX") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenablesubsidiarylist&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setenablesubsidiarylist&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenablesubsidiarylist&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setenablesubsidiarylist&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@ -279,11 +279,11 @@ if (! empty($user->admin))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/journals_list.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Setup page to configure journals
|
||||
*/
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/productaccount.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief To define accounting account on product / service
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/bookkeeping/balance.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Balance of book keeping
|
||||
*/
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/bookkeeping/balancebymonth.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Balance by month
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/bookkeeping/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page to show book-entry
|
||||
*/
|
||||
|
||||
@ -373,7 +373,7 @@ if ($action == 'create')
|
||||
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Piece") . '</td>';
|
||||
print '<td><input type="text" class="minwidth200" name="doc_ref" value=""/></td>';
|
||||
print '<td><input type="text" class="minwidth200" name="doc_ref" value="'.GETPOST('doc_ref', 'alpha').'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
/*
|
||||
@ -531,11 +531,11 @@ if ($action == 'create')
|
||||
print '<td class="titlefield">' . $langs->trans("Status") . '</td>';
|
||||
print '<td>';
|
||||
if (empty($object->validated)) {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=enable">';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=enable">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=disable">';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=disable">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
@ -615,23 +615,23 @@ if ($action == 'create')
|
||||
|
||||
if ($action == 'update' && $line->id == $id) {
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($line->numero_compte, 'accountingaccount_number', 1, array (), 1, 1, '');
|
||||
print $formaccounting->select_account((GETPOSTISSET("accountingaccount_number") ? GETPOST("accountingaccount_number", "alpha") : $line->numero_compte), 'accountingaccount_number', 1, array (), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not
|
||||
// use setup of keypress to select thirdparty and this hang browser on large database.
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||
{
|
||||
print $formaccounting->select_auxaccount($line->subledger_account, 'subledger_account', 1);
|
||||
print $formaccounting->select_auxaccount((GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account), 'subledger_account', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" name="subledger_account" value="'.$line->subledger_account.'">';
|
||||
print '<input type="text" name="subledger_account" value="'.(GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account).'">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="debit" value="' . price($line->debit) . '"/></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="credit" value="' . price($line->credit) . '"/></td>';
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value="' . (GETPOSTISSET("label_operation") ? GETPOST("label_operation", "alpha") : $line->label_operation). '"></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="debit" value="' . (GETPOSTISSET("debit") ? GETPOST("debit", "alpha") : price($line->debit)) . '"></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="credit" value="' . (GETPOSTISSET("credit") ? GETPOST("credit", "alpha") : price($line->credit)) . '"></td>';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n";
|
||||
print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">';
|
||||
@ -672,21 +672,21 @@ if ($action == 'create')
|
||||
if ($action == "" || $action == 'add') {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($accountingaccount_number, 'accountingaccount_number', 1, array (), 1, 1, '');
|
||||
print $formaccounting->select_account('', 'accountingaccount_number', 1, array (), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
|
||||
// use setup of keypress to select thirdparty and this hang browser on large database.
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||
{
|
||||
print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1);
|
||||
print $formaccounting->select_auxaccount('', 'subledger_account', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" name="subledger_account" value="">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value=""/></td>';
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value="'.$label_operation.'"/></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="debit" value=""/></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="credit" value=""/></td>';
|
||||
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/bookkeeping/list.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief List operation of book keeping
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
@ -47,6 +48,9 @@ $search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmo
|
||||
$search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
|
||||
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
|
||||
$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
|
||||
$search_date_export_start = dol_mktime(0, 0, 0, GETPOST('date_export_startmonth', 'int'), GETPOST('date_export_startday', 'int'), GETPOST('date_export_startyear', 'int'));
|
||||
$search_date_export_end = dol_mktime(0, 0, 0, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
|
||||
|
||||
//var_dump($search_date_start);exit;
|
||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||
$action = 'delbookkeepingyear';
|
||||
@ -143,6 +147,7 @@ $arrayfields=array(
|
||||
't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1),
|
||||
't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0),
|
||||
't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0),
|
||||
't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1),
|
||||
);
|
||||
|
||||
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']);
|
||||
@ -178,6 +183,8 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_date_creation_end = '';
|
||||
$search_date_modification_start = '';
|
||||
$search_date_modification_end = '';
|
||||
$search_date_export_start = '';
|
||||
$search_date_export_end = '';
|
||||
$search_debit = '';
|
||||
$search_credit = '';
|
||||
$search_lettering_code = '';
|
||||
@ -269,6 +276,16 @@ if (! empty($search_date_modification_end)) {
|
||||
$tmp=dol_getdate($search_date_modification_end);
|
||||
$param .= '&date_modification_endmonth=' . $tmp['mon'] . '&date_modification_endday=' . $tmp['mday'] . '&date_modification_endyear=' . $tmp['year'];
|
||||
}
|
||||
if (! empty($search_date_export_start)) {
|
||||
$filter['t.date_export>='] = $search_date_export_start;
|
||||
$tmp=dol_getdate($search_date_export_start);
|
||||
$param .= '&date_export_startmonth=' . $tmp['mon'] . '&date_export_startday=' . $tmp['mday'] . '&date_export_startyear=' . $tmp['year'];
|
||||
}
|
||||
if (! empty($search_date_export_end)) {
|
||||
$filter['t.date_export<='] = $search_date_export_end;
|
||||
$tmp=dol_getdate($search_date_export_end);
|
||||
$param .= '&date_export_endmonth=' . $tmp['mon'] . '&date_export_endday=' . $tmp['mday'] . '&date_export_endyear=' . $tmp['year'];
|
||||
}
|
||||
if (! empty($search_debit)) {
|
||||
$filter['t.debit'] = $search_debit;
|
||||
$param .= '&search_debit=' . urlencode($search_debit);
|
||||
@ -348,8 +365,7 @@ if ($action == 'delmouvconfirm') {
|
||||
|
||||
// Export into a file with format defined into setup (FEC, CSV, ...)
|
||||
if ($action == 'export_file') {
|
||||
|
||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT);
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -357,17 +373,57 @@ if ($action == 'export_file') {
|
||||
}
|
||||
else
|
||||
{
|
||||
// Export files
|
||||
$accountancyexport = new AccountancyExport($db);
|
||||
$accountancyexport->export($object->lines);
|
||||
|
||||
if (!empty($accountancyexport->errors))
|
||||
{
|
||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||
}
|
||||
if (! empty($accountancyexport->errors))
|
||||
{
|
||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||
} else {
|
||||
// Specify as export : update field date_export
|
||||
// TODO Move in class bookKeeping
|
||||
$error=0;
|
||||
$db->begin();
|
||||
|
||||
if (is_array($object->lines)) {
|
||||
foreach ($object->lines as $movement) {
|
||||
$now = dol_now();
|
||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping";
|
||||
$sql .= " SET date_export = '" . $db->idate($now) . "'";
|
||||
$sql .= " WHERE rowid = " . $movement->id;
|
||||
|
||||
dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported sql=" . $sql, LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$db->commit();
|
||||
// setEventMessages($langs->trans("AllExportedMovementsWereRecordedAsExported"), null, 'mesgs');
|
||||
} else {
|
||||
$db->rollback();
|
||||
// setEventMessages($langs->trans("NotAllExportedMovementsCouldBeRecordedAsExported"), null, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setreexport') {
|
||||
$export = 0;
|
||||
$setreexport = GETPOST('value', 'int');
|
||||
if (! dolibarr_set_const($db, "ACCOUNTING_REEXPORT", $setreexport, 'yesno', 0, '', $conf->entity)) $error++;
|
||||
|
||||
if (! $error) {
|
||||
if ($conf->global->ACCOUNTING_REEXPORT == 1) {
|
||||
setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsEnable"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsDisable"), null, 'mesgs');
|
||||
}
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -380,14 +436,14 @@ llxHeader('', $title_page);
|
||||
// List
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT);
|
||||
if ($nbtotalofrecords < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Do not use this
|
||||
$result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter);
|
||||
$result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
@ -442,17 +498,25 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
$listofformat=AccountancyExport::getType();
|
||||
$button .= '<a class="butAction" title="" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">';
|
||||
|
||||
$listofformat=AccountancyExport::getType();
|
||||
if (count($filter)) $buttonLabel = $langs->trans("ExportFilteredList");
|
||||
else $buttonLabel = $langs->trans("ExportList");
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($buttonLabel, '', 'fa fa-file-export', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:''));
|
||||
// Button re-export
|
||||
if (! empty($conf->global->ACCOUNTING_REEXPORT)) {
|
||||
$newcardbutton ='<a href="'.$_SERVER['PHP_SELF'].'?action=setreexport&value=0'.($param?'&'.$param:'').'">'.img_picto($langs->trans("Activated"), 'switch_on').'</a> ';
|
||||
} else {
|
||||
$newcardbutton ='<a href="'.$_SERVER['PHP_SELF'].'?action=setreexport&value=1'.($param?'&'.$param:'').'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a> ';
|
||||
}
|
||||
$newcardbutton.= $langs->trans("IncludeDocsAlreadyExported");
|
||||
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-object-group', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param);
|
||||
$newcardbutton.= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:''));
|
||||
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle', './card.php?action=create');
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param);
|
||||
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create');
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
@ -596,6 +660,20 @@ if (! empty($arrayfields['t.tms']['checked']))
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
// Date export
|
||||
if (! empty($arrayfields['t.date_export']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From') . ' ';
|
||||
print $form->selectDate($search_date_export_start, 'date_export_start', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to') . ' ';
|
||||
print $form->selectDate($search_date_export_end, 'date_export_end', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
// Action column
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
@ -616,6 +694,7 @@ if (! empty($arrayfields['t.lettering_code']['checked'])) print_liste_field_tit
|
||||
if (! empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['t.date_creation']['checked'])) print_liste_field_titre($arrayfields['t.date_creation']['label'], $_SERVER['PHP_SELF'], "t.date_creation", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['t.date_export']['checked'])) print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -728,11 +807,20 @@ if ($num > 0)
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Exported operation date
|
||||
if (! empty($arrayfields['t.date_export']['checked']))
|
||||
{
|
||||
print '<td align="center">' . dol_print_date($line->date_export, 'dayhour') . '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Action column
|
||||
print '<td class="nowraponall center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
if(empty($line->date_export)) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_delete() . '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/bookkeeping/listbyaccount.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief List operation of book keeping ordered by account number
|
||||
*/
|
||||
|
||||
@ -256,8 +256,8 @@ if ($action == 'delbookkeepingyear') {
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle', './card.php?action=create');
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create');
|
||||
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Tab to setup lettering
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/accountancycategory.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief File of class to manage categories of an accounting category_type
|
||||
*/
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
|
||||
* Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
|
||||
* Copyright (C) 2017 André Schild <a.schild@aarboard.ch>
|
||||
*
|
||||
* 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
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/accountancyexport.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Class accountancy export
|
||||
*/
|
||||
|
||||
@ -51,6 +51,7 @@ class AccountancyExport
|
||||
public static $EXPORT_TYPE_AGIRIS = 9;
|
||||
public static $EXPORT_TYPE_FEC = 11;
|
||||
public static $EXPORT_TYPE_OPENCONCERTO = 12;
|
||||
public static $EXPORT_TYPE_SAGE50_SWISS = 13;
|
||||
|
||||
|
||||
/**
|
||||
@ -106,6 +107,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'),
|
||||
self::$EXPORT_TYPE_OPENCONCERTO => $langs->trans('Modelcsv_openconcerto'),
|
||||
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
||||
self::$EXPORT_TYPE_SAGE50_SWISS => $langs->trans('Modelcsv_Sage50_Swiss'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -130,6 +132,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_AGIRIS => 'agiris',
|
||||
self::$EXPORT_TYPE_OPENCONCERTO => 'openconcerto',
|
||||
self::$EXPORT_TYPE_FEC => 'fec',
|
||||
self::$EXPORT_TYPE_SAGE50_SWISS => 'sage50ch',
|
||||
);
|
||||
|
||||
return $formatcode[$type];
|
||||
@ -194,6 +197,10 @@ class AccountancyExport
|
||||
'label' => $langs->trans('Modelcsv_openconcerto'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'csv',
|
||||
),
|
||||
self::$EXPORT_TYPE_SAGE50_SWISS => array(
|
||||
'label' => $langs->trans('Modelcsv_Sage50_Swiss'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'csv',
|
||||
),
|
||||
),
|
||||
'cr'=> array (
|
||||
'1' => $langs->trans("Unix"),
|
||||
@ -261,6 +268,9 @@ class AccountancyExport
|
||||
case self::$EXPORT_TYPE_FEC :
|
||||
$this->exportFEC($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_SAGE50_SWISS :
|
||||
$this->exportSAGE50SWISS($TData);
|
||||
break;
|
||||
default:
|
||||
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
|
||||
break;
|
||||
@ -575,19 +585,19 @@ class AccountancyExport
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
|
||||
print $line->piece_num . $separator;
|
||||
print $line->label_operation . $separator;
|
||||
print self::toAnsi($line->label_operation) . $separator;
|
||||
print $date . $separator;
|
||||
print $line->label_operation . $separator;
|
||||
print self::toAnsi($line->label_operation) . $separator;
|
||||
|
||||
if (empty($line->subledger_account)) {
|
||||
print length_accountg($line->numero_compte) . $separator;
|
||||
print $line->label_compte . $separator;
|
||||
print self::toAnsi($line->label_compte) . $separator;
|
||||
} else {
|
||||
print length_accounta($line->subledger_account) . $separator;
|
||||
print $line->subledger_label . $separator;
|
||||
print self::toAnsi($line->subledger_label) . $separator;
|
||||
}
|
||||
|
||||
print $line->doc_ref . $separator;
|
||||
print self::toAnsi($line->doc_ref) . $separator;
|
||||
print price($line->debit) . $separator;
|
||||
print price($line->credit) . $separator;
|
||||
print price($line->montant) . $separator;
|
||||
@ -616,7 +626,7 @@ class AccountancyExport
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
|
||||
print $date . $separator;
|
||||
print $line->code_journal;
|
||||
print $line->code_journal . $separator;
|
||||
if (empty($line->subledger_account)) {
|
||||
print length_accountg($line->numero_compte) . $separator;
|
||||
} else {
|
||||
@ -757,6 +767,156 @@ class AccountancyExport
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export format : SAGE50SWISS
|
||||
*
|
||||
* https://onlinehelp.sageschweiz.ch/default.aspx?tabid=19984
|
||||
* http://media.topal.ch/Public/Schnittstellen/TAF/Specification/Sage50-TAF-format.pdf
|
||||
*
|
||||
* @param array $objectLines data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function exportSAGE50SWISS($objectLines)
|
||||
{
|
||||
// SAGE50SWISS
|
||||
$this->separator = ',';
|
||||
$this->end_line = "\r\n";
|
||||
|
||||
// Print header line
|
||||
print "Blg,Datum,Kto,S/H,Grp,GKto,SId,SIdx,KIdx,BTyp,MTyp,Code,Netto,Steuer,FW-Betrag,Tx1,Tx2,PkKey,OpId,Flag";
|
||||
print $this->end_line;
|
||||
$thisPieceNum= "";
|
||||
$thisPieceAccountNr= "";
|
||||
$aSize= count($objectLines);
|
||||
foreach ($objectLines as $aIndex=>$line)
|
||||
{
|
||||
$sammelBuchung= false;
|
||||
if ($aIndex-2 >= 0 && $objectLines[$aIndex-2]->piece_num == $line->piece_num)
|
||||
{
|
||||
$sammelBuchung= true;
|
||||
}
|
||||
elseif ($aIndex+2 < $aSize && $objectLines[$aIndex+2]->piece_num == $line->piece_num)
|
||||
{
|
||||
$sammelBuchung= true;
|
||||
}
|
||||
elseif ($aIndex+1 < $aSize
|
||||
&& $objectLines[$aIndex+1]->piece_num == $line->piece_num
|
||||
&& $aIndex-1 < $aSize
|
||||
&& $objectLines[$aIndex-1]->piece_num == $line->piece_num
|
||||
)
|
||||
{
|
||||
$sammelBuchung= true;
|
||||
}
|
||||
|
||||
//Blg
|
||||
print $line->piece_num . $this->separator;
|
||||
|
||||
// Datum
|
||||
$date = dol_print_date($line->doc_date, '%d.%m.%Y');
|
||||
print $date . $this->separator;
|
||||
|
||||
// Kto
|
||||
print length_accountg($line->numero_compte) . $this->separator;
|
||||
// S/H
|
||||
if ($line->sens == 'D')
|
||||
{
|
||||
print 'S' . $this->separator;
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'H' . $this->separator;
|
||||
}
|
||||
//Grp
|
||||
print self::trunc($line->code_journal, 1) . $this->separator;
|
||||
// GKto
|
||||
if (empty($line->code_tiers))
|
||||
{
|
||||
if ($line->piece_num == $thisPieceNum)
|
||||
{
|
||||
print length_accounta($thisPieceAccountNr) . $this->separator;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "div" . $this->separator;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print length_accounta($line->code_tiers) . $this->separator;
|
||||
}
|
||||
//SId
|
||||
print $this->separator;
|
||||
//SIdx
|
||||
print "0" . $this->separator;
|
||||
//KIdx
|
||||
print "0" . $this->separator;
|
||||
//BTyp
|
||||
print "0" . $this->separator;
|
||||
|
||||
//MTyp 1=Fibu Einzelbuchung 2=Sammebuchung
|
||||
if ($sammelBuchung)
|
||||
{
|
||||
print "2" . $this->separator;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "1" . $this->separator;
|
||||
}
|
||||
// Code
|
||||
print '""' . $this->separator;
|
||||
// Netto
|
||||
if ($line->montant >= 0)
|
||||
{
|
||||
print $line->montant . $this->separator;
|
||||
}
|
||||
else
|
||||
{
|
||||
print $line->montant*-1 . $this->separator;
|
||||
}
|
||||
// Steuer
|
||||
print "0.00" . $this->separator;
|
||||
// FW-Betrag
|
||||
print "0.00" . $this->separator;
|
||||
// Tx1
|
||||
$line1= self::toAnsi($line->label_compte, 29);
|
||||
if ($line1 == "LIQ" || $line1 == "LIQ Beleg ok" || strlen($line1) <= 3)
|
||||
{
|
||||
$line1= "";
|
||||
}
|
||||
$line2= self::toAnsi($line->doc_ref, 29);
|
||||
if (strlen($line1) == 0)
|
||||
{
|
||||
$line1= $line2;
|
||||
$line2= "";
|
||||
}
|
||||
if (strlen($line1) > 0 && strlen($line2) > 0 && (strlen($line1) + strlen($line2)) < 27)
|
||||
{
|
||||
$line1= $line1 . ' / ' . $line2;
|
||||
$line2= "";
|
||||
}
|
||||
|
||||
print '"' . self::toAnsi($line1). '"' . $this->separator;
|
||||
// Tx2
|
||||
print '"' . self::toAnsi($line2). '"' . $this->separator;
|
||||
//PkKey
|
||||
print "0" . $this->separator;
|
||||
//OpId
|
||||
print $this->separator;
|
||||
|
||||
// Flag
|
||||
print "0";
|
||||
|
||||
print $this->end_line;
|
||||
|
||||
if ($line->piece_num !== $thisPieceNum)
|
||||
{
|
||||
$thisPieceNum= $line->piece_num;
|
||||
$thisPieceAccountNr= $line->numero_compte;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $str data
|
||||
@ -767,4 +927,20 @@ class AccountancyExport
|
||||
{
|
||||
return dol_trunc($str, $size, 'right', 'UTF-8', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param unknown $str Original string to encode and optionaly truncate
|
||||
* @param integer $size truncate string after $size characters
|
||||
* @return string String encoded in Windows-1251 charset
|
||||
*/
|
||||
public static function toAnsi($str, $size = -1)
|
||||
{
|
||||
$retVal= dol_string_nohtmltag($str, 1, 'Windows-1251');
|
||||
if ($retVal >= 0 && $size >= 0)
|
||||
{
|
||||
$retVal= mb_substr($retVal, 0, $size, 'Windows-1251');
|
||||
}
|
||||
return $retVal;
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/accountancysystem.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief File of class to manage accountancy systems
|
||||
*/
|
||||
|
||||
@ -83,13 +83,13 @@ class AccountancySystem
|
||||
|
||||
if ($rowid > 0 || $ref)
|
||||
{
|
||||
$sql = "SELECT a.pcg_version, a.label, a.active";
|
||||
$sql = "SELECT a.rowid, a.pcg_version, a.label, a.active";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system as a";
|
||||
$sql .= " WHERE";
|
||||
if ($rowid) {
|
||||
$sql .= " a.rowid = '" . $rowid . "'";
|
||||
} elseif ($ref) {
|
||||
$sql .= " a.pcg_version = '" . $ref . "'";
|
||||
$sql .= " a.pcg_version = '" . $this->db->escape($ref) . "'";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/accountingaccount.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief File of class to manage accounting accounts
|
||||
*/
|
||||
|
||||
@ -151,12 +151,13 @@ class AccountingAccount extends CommonObject
|
||||
/**
|
||||
* Load record in memory
|
||||
*
|
||||
* @param int $rowid Id
|
||||
* @param string $account_number Account number
|
||||
* @param int $limittocurrentchart 1=Do not load record if it is into another accounting system
|
||||
* @return int <0 if KO, 0 if not found, Id of record if OK and found
|
||||
* @param int $rowid Id
|
||||
* @param string $account_number Account number
|
||||
* @param int|boolean $limittocurrentchart 1 or true=Load record only if it is into current active char of account
|
||||
* @param string $limittoachartaccount 'ABC'=Load record only if it is into chart account with code 'ABC'.
|
||||
* @return int <0 if KO, 0 if not found, Id of record if OK and found
|
||||
*/
|
||||
public function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0)
|
||||
public function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0, $limittoachartaccount = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -174,6 +175,9 @@ class AccountingAccount extends CommonObject
|
||||
if (! empty($limittocurrentchart)) {
|
||||
$sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $this->db->escape($conf->global->CHARTOFACCOUNTS) . ')';
|
||||
}
|
||||
if (! empty($limittoachartaccount)) {
|
||||
$sql .= " AND a.fk_pcg_version = '".$this->db->escape($limittoachartaccount)."'";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/accountingjournal.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief File of class to manage accounting journals
|
||||
*/
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/bookkeeping.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief File of class to manage Ledger (General Ledger and Subledger)
|
||||
*/
|
||||
|
||||
@ -202,9 +202,6 @@ class BookKeeping extends CommonObject
|
||||
if (isset($this->sens)) {
|
||||
$this->sens = trim($this->sens);
|
||||
}
|
||||
if (isset($this->fk_user_author)) {
|
||||
$this->fk_user_author = trim($this->fk_user_author);
|
||||
}
|
||||
if (isset($this->import_key)) {
|
||||
$this->import_key = trim($this->import_key);
|
||||
}
|
||||
@ -522,9 +519,6 @@ class BookKeeping extends CommonObject
|
||||
if (isset($this->sens)) {
|
||||
$this->sens = trim($this->sens);
|
||||
}
|
||||
if (isset($this->fk_user_author)) {
|
||||
$this->fk_user_author = trim($this->fk_user_author);
|
||||
}
|
||||
if (isset($this->import_key)) {
|
||||
$this->import_key = trim($this->import_key);
|
||||
}
|
||||
@ -866,15 +860,16 @@ class BookKeeping extends CommonObject
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param string $sortorder Sort Order
|
||||
* @param string $sortfield Sort field
|
||||
* @param int $limit Offset limit
|
||||
* @param int $offset Offset limit
|
||||
* @param array $filter Filter array
|
||||
* @param string $filtermode Filter mode (AND or OR)
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param string $sortorder Sort Order
|
||||
* @param string $sortfield Sort field
|
||||
* @param int $limit Offset limit
|
||||
* @param int $offset Offset limit
|
||||
* @param array $filter Filter array
|
||||
* @param string $filtermode Filter mode (AND or OR)
|
||||
* @param int $showAlreadyExportMovements Show movements when field 'date_export' is not empty (0:No / 1:Yes (Default))
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
||||
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND', $showAlreadyExportMovements = 1)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -904,7 +899,8 @@ class BookKeeping extends CommonObject
|
||||
$sql .= " t.journal_label,";
|
||||
$sql .= " t.piece_num,";
|
||||
$sql .= " t.date_creation,";
|
||||
$sql .= " t.tms as date_modification";
|
||||
$sql .= " t.tms as date_modification,";
|
||||
$sql .= " t.date_export";
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
||||
// Manage filter
|
||||
$sqlwhere = array ();
|
||||
@ -924,6 +920,8 @@ class BookKeeping extends CommonObject
|
||||
$sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\'';
|
||||
} elseif ($key == 't.tms>=' || $key == 't.tms<=') {
|
||||
$sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\'';
|
||||
} elseif ($key == 't.date_export>=' || $key == 't.date_export<=') {
|
||||
$sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\'';
|
||||
} elseif ($key == 't.credit' || $key == 't.debit') {
|
||||
$sqlwhere[] = natural_search($key, $value, 1, 1);
|
||||
} else {
|
||||
@ -932,10 +930,12 @@ class BookKeeping extends CommonObject
|
||||
}
|
||||
}
|
||||
$sql.= ' WHERE t.entity IN (' . getEntity('accountancy') . ')';
|
||||
if ($showAlreadyExportMovements == 0) {
|
||||
$sql .= " AND t.date_export IS NULL";
|
||||
}
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= ' AND ' . implode(' ' . $filtermode . ' ', $sqlwhere);
|
||||
}
|
||||
|
||||
if (! empty($sortfield)) {
|
||||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
}
|
||||
@ -978,6 +978,7 @@ class BookKeeping extends CommonObject
|
||||
$line->piece_num = $obj->piece_num;
|
||||
$line->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$line->date_modification = $this->db->jdate($obj->date_modification);
|
||||
$line->date_export = $this->db->jdate($obj->date_export);
|
||||
|
||||
$this->lines[] = $line;
|
||||
|
||||
@ -1139,9 +1140,6 @@ class BookKeeping extends CommonObject
|
||||
if (isset($this->sens)) {
|
||||
$this->sens = trim($this->sens);
|
||||
}
|
||||
if (isset($this->fk_user_author)) {
|
||||
$this->fk_user_author = trim($this->fk_user_author);
|
||||
}
|
||||
if (isset($this->import_key)) {
|
||||
$this->import_key = trim($this->import_key);
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/lettering.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief File of class for lettering
|
||||
*/
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/customer/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Card customer ventilation
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/customer/index.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Home customer journalization page
|
||||
*/
|
||||
|
||||
@ -143,9 +143,9 @@ $textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_cur
|
||||
|
||||
print load_fiche_titre($langs->trans("CustomersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy');
|
||||
|
||||
print $langs->trans("DescVentilCustomer") . '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilCustomer") . '<br>';
|
||||
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
|
||||
print '<br>';
|
||||
print '</span><br>';
|
||||
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/customer/lines.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page of detail of the lines of ventilation of invoices customers
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -294,7 +294,7 @@ if ($result) {
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
print $langs->trans("DescVentilDoneCustomer") . '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneCustomer") . '</span><br>';
|
||||
|
||||
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
|
||||
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
||||
@ -310,9 +310,9 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.dol_escape_htmltag($search_day).'">';
|
||||
print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_day" value="'.dol_escape_htmltag($search_day).'">';
|
||||
}
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.dol_escape_htmltag($search_month).'">';
|
||||
print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month" value="'.dol_escape_htmltag($search_month).'">';
|
||||
$formother->select_year($search_year, 'search_year', 1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/customer/list.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Ventilation page from customers invoices
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -214,7 +214,7 @@ $sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation
|
||||
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
|
||||
$sql.= " p.accountancy_code_sell_intra as code_sell_intra, p.accountancy_code_sell_export as code_sell_export,";
|
||||
$sql.= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,";
|
||||
$sql.= " co.code as country_code, co.label as country,";
|
||||
$sql.= " co.code as country_code, co.label as country_label,";
|
||||
$sql.= " s.tva_intra";
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -356,7 +356,7 @@ if ($result) {
|
||||
|
||||
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
|
||||
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilTodoCustomer") . '</span></br><br>';
|
||||
|
||||
/*$topicmail="Information";
|
||||
$modelmail="project";
|
||||
@ -377,9 +377,9 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
}
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year, 'search_year', 1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||
@ -407,10 +407,10 @@ if ($result) {
|
||||
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right maxwidth50 ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', 'center ');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', '', '', 'center ');
|
||||
$checkpicto='';
|
||||
@ -514,7 +514,10 @@ if ($result) {
|
||||
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
|
||||
print '</td>';
|
||||
|
||||
print '<td>' . $objp->country .'</td>';
|
||||
print '<td class="center">';
|
||||
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
|
||||
print $labelcountry;
|
||||
print '</td>';
|
||||
|
||||
print '<td>' . $objp->tva_intra . '</td>';
|
||||
|
||||
@ -529,7 +532,7 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Suggested accounting account
|
||||
print '<td class="center">';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
*/
|
||||
/**
|
||||
* \file htdocs/accountancy/supplier/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Card expense report ventilation
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/expensereport/index.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Home expense report ventilation
|
||||
*/
|
||||
|
||||
@ -139,9 +139,9 @@ $textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_cur
|
||||
|
||||
print load_fiche_titre($langs->trans("ExpenseReportsVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy');
|
||||
|
||||
print $langs->trans("DescVentilExpenseReport") . '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilExpenseReport") . '<br>';
|
||||
print $langs->trans("DescVentilExpenseReportMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
|
||||
print '<br>';
|
||||
print '</span><br>';
|
||||
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/expensereport/lines.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page of detail of the lines of ventilation of expense reports
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -248,7 +248,7 @@ if ($result) {
|
||||
|
||||
print_barre_liste($langs->trans("ExpenseReportLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
|
||||
print $langs->trans("DescVentilDoneExpenseReport") . '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneExpenseReport") . '</span><br>';
|
||||
|
||||
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
|
||||
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
||||
@ -263,8 +263,8 @@ if ($result) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
|
||||
print '<td class="liste_titre center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year, 'search_year', 1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/expensereport/list.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Ventilation page from expense reports
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -289,7 +289,7 @@ if ($result) {
|
||||
|
||||
print_barre_liste($langs->trans("ExpenseReportLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
|
||||
print $langs->trans("DescVentilTodoExpenseReport") . '</br><br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilTodoExpenseReport") . '</span></br><br>';
|
||||
|
||||
/*$topicmail="Information";
|
||||
$modelmail="project";
|
||||
@ -309,8 +309,8 @@ if ($result) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
|
||||
print '<td class="liste_titre center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year, 'search_year', 1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||
@ -331,7 +331,7 @@ if ($result) {
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right maxwidth50 ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', $sortfield, $sortorder, 'center ');
|
||||
@ -386,7 +386,7 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Current account
|
||||
print '<td class="center">';
|
||||
print '<td>';
|
||||
print length_accountg(html_entity_decode($objp->code_buy));
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/index.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Home accounting module
|
||||
*/
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/journal/bankjournal.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page with bank journal
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -987,15 +987,14 @@ if (empty($action) || $action == 'view') {
|
||||
print '<div class="div-table-responsive">';
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td></td>";
|
||||
print "<td>" . $langs->trans("Date") . "</td>";
|
||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ObjectsRef") . ")</td>";
|
||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||
print "<td>" . $langs->trans("PaymentMode") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
|
||||
print '<td class="center">' . $langs->trans("PaymentMode") . "</td>";
|
||||
print '<td class="right">' . $langs->trans("Debit") . "</td>";
|
||||
print '<td class="right">' . $langs->trans("Credit") . "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$r = '';
|
||||
@ -1019,7 +1018,6 @@ if (empty($action) || $action == 'view') {
|
||||
//var_dump($tabpay[$key]);
|
||||
print '<!-- Bank bank.rowid='.$key.' type='.$tabpay[$key]['type'].' ref='.$tabpay[$key]['ref'].'-->';
|
||||
print '<tr class="oddeven">';
|
||||
print "<td></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
// Ledger account
|
||||
@ -1043,9 +1041,9 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td>";
|
||||
print $reflabel;
|
||||
print "</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="center">' . $val["type_payment"] . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
@ -1061,7 +1059,6 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
print '<!-- Thirdparty bank.rowid='.$key.' -->';
|
||||
print '<tr class="oddeven">';
|
||||
print "<td></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
// Ledger account
|
||||
@ -1125,9 +1122,9 @@ if (empty($action) || $action == 'view') {
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>" . $reflabel . "</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="center">' . $val["type_payment"] . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
@ -1141,7 +1138,6 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
print '<!-- Wait bank.rowid='.$key.' -->';
|
||||
print '<tr class="oddeven">';
|
||||
print "<td></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
// Ledger account
|
||||
@ -1162,9 +1158,9 @@ if (empty($action) || $action == 'view') {
|
||||
*/
|
||||
print "</td>";
|
||||
print "<td>" . $reflabel . "</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="center">' . $val["type_payment"] . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/journal/expensereportsjournal.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page with expense reports journal
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -549,14 +549,13 @@ if (empty($action) || $action == 'view') {
|
||||
print '<div class="div-table-responsive">';
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td></td>";
|
||||
print "<td>" . $langs->trans("Date") . "</td>";
|
||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ExpenseReportRef") . ")</td>";
|
||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
|
||||
print '<td class="right">' . $langs->trans("Debit") . "</td>";
|
||||
print '<td class="right">' . $langs->trans("Credit") . "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$r = '';
|
||||
@ -578,7 +577,7 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Fees --></td>";
|
||||
print "<!-- Fees -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
|
||||
$userstatic->id = $tabuser[$key]['id'];
|
||||
@ -598,20 +597,21 @@ if (empty($action) || $action == 'view') {
|
||||
$userstatic->id = $tabuser[$key]['id'];
|
||||
$userstatic->name = $tabuser[$key]['name'];
|
||||
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $accountingaccount->label . "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
|
||||
$userstatic->id = $tabuser[$key]['id'];
|
||||
$userstatic->name = $tabuser[$key]['name'];
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<!-- Thirdparty -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
|
||||
@ -631,8 +631,8 @@ if (empty($action) || $action == 'view') {
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print '<td class="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
@ -646,7 +646,7 @@ if (empty($action) || $action == 'view') {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT --></td>";
|
||||
print "<!-- VAT -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -663,8 +663,8 @@ if (empty($action) || $action == 'view') {
|
||||
print '</td>';
|
||||
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
|
||||
print "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/journal/purchasesjournal.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page with purchases journal
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -743,6 +743,7 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
// Button to write into Ledger
|
||||
if (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
|
||||
print '<br>';
|
||||
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
|
||||
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
}
|
||||
@ -782,14 +783,13 @@ if (empty($action) || $action == 'view') {
|
||||
print '<div class="div-table-responsive">';
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td></td>";
|
||||
print "<td>" . $langs->trans("Date") . "</td>";
|
||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
|
||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
|
||||
print '<td class="center">' . $langs->trans("Debit") . "</td>";
|
||||
print '<td class="center">' . $langs->trans("Credit") . "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$r = '';
|
||||
@ -829,7 +829,7 @@ if (empty($action) || $action == 'view') {
|
||||
if ($replacedinvoice == 1)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Replaced invoice --></td>";
|
||||
print "<!-- Replaced invoice -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td><strike>" . $invoicestatic->getNomUrl(1) . "</strike></td>";
|
||||
// Account
|
||||
@ -850,7 +850,7 @@ if (empty($action) || $action == 'view') {
|
||||
if ($errorforinvoice[$key] == 'somelinesarenotbound')
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Some lines are not bound --></td>";
|
||||
print "<!-- Some lines are not bound -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -871,7 +871,7 @@ if (empty($action) || $action == 'view') {
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<!-- Thirdparty -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -893,8 +893,8 @@ if (empty($action) || $action == 'view') {
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print '<td class="right">'. ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">'. ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
@ -906,7 +906,7 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Product --></td>";
|
||||
print "<!-- Product -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -924,8 +924,8 @@ if (empty($action) || $action == 'view') {
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label . "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
@ -940,7 +940,7 @@ if (empty($action) || $action == 'view') {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT --></td>";
|
||||
print "<!-- VAT -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -958,8 +958,8 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td>";
|
||||
print $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
|
||||
print "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
@ -971,7 +971,7 @@ if (empty($action) || $action == 'view') {
|
||||
foreach ($tabother[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT counterpart NPR --></td>";
|
||||
print "<!-- VAT counterpart NPR -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -987,8 +987,8 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td>";
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT") . " NPR (counterpart)</td>";
|
||||
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/journal/sellsjournal.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page with sells journal
|
||||
*/
|
||||
|
||||
@ -680,6 +680,7 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
// Button to write into Ledger
|
||||
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
|
||||
print '<br>';
|
||||
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
|
||||
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
}
|
||||
@ -719,14 +720,13 @@ if (empty($action) || $action == 'view') {
|
||||
print '<div class="div-table-responsive">';
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td></td>";
|
||||
print "<td>" . $langs->trans("Date") . "</td>";
|
||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
|
||||
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
|
||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
|
||||
print '<td class="center">' . $langs->trans("Debit") . "</td>";
|
||||
print '<td class="center">' . $langs->trans("Credit") . "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$r = '';
|
||||
@ -764,7 +764,7 @@ if (empty($action) || $action == 'view') {
|
||||
if ($replacedinvoice == 1)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Replaced invoice --></td>";
|
||||
print "<!-- Replaced invoice -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td><strike>" . $invoicestatic->getNomUrl(1) . "</strike></td>";
|
||||
// Account
|
||||
@ -785,7 +785,7 @@ if (empty($action) || $action == 'view') {
|
||||
if ($errorforinvoice[$key] == 'somelinesarenotbound')
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Some lines are not bound --></td>";
|
||||
print "<!-- Some lines are not bound -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -807,7 +807,7 @@ if (empty($action) || $action == 'view') {
|
||||
{
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<!-- Thirdparty -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -829,8 +829,8 @@ if (empty($action) || $action == 'view') {
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
@ -843,7 +843,7 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Product --></td>";
|
||||
print "<!-- Product -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -861,8 +861,8 @@ if (empty($action) || $action == 'view') {
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label . "</td>";
|
||||
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
@ -878,7 +878,7 @@ if (empty($action) || $action == 'view') {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT --></td>";
|
||||
print "<!-- VAT -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
@ -895,8 +895,8 @@ if (empty($action) || $action == 'view') {
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
|
||||
print "</td>";
|
||||
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
*/
|
||||
/**
|
||||
* \file htdocs/accountancy/supplier/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Card supplier ventilation
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/supplier/index.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Home supplier journalization page
|
||||
*/
|
||||
|
||||
@ -140,9 +140,9 @@ $textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_cur
|
||||
|
||||
print load_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy');
|
||||
|
||||
print $langs->trans("DescVentilSupplier") . '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilSupplier") . '<br>';
|
||||
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
|
||||
print '<br>';
|
||||
print '</span><br>';
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/supplier/lines.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Page of detail of the lines of ventilation of invoices suppliers
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -297,7 +297,7 @@ if ($result) {
|
||||
|
||||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
|
||||
print $langs->trans("DescVentilDoneSupplier") . '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneSupplier") . '</span><br>';
|
||||
|
||||
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
|
||||
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
||||
@ -314,8 +314,8 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year, 'search_year', 1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/supplier/list.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Accountancy (Double entries)
|
||||
* \brief Ventilation page from suppliers invoices
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
@ -214,7 +214,7 @@ $sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_lab
|
||||
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
|
||||
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,";
|
||||
$sql.= " aa.rowid as aarowid,";
|
||||
$sql.= " co.code as country_code, co.label as country,";
|
||||
$sql.= " co.code as country_code, co.label as country_label,";
|
||||
$sql.= " s.tva_intra";
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -355,7 +355,7 @@ if ($result) {
|
||||
|
||||
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
|
||||
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilTodoCustomer") . '</span></br><br>';
|
||||
|
||||
/*$topicmail="Information";
|
||||
$modelmail="project";
|
||||
@ -376,8 +376,8 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year, 'search_year', 1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||
@ -406,7 +406,7 @@ if ($result) {
|
||||
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right maxwidth50 ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
@ -502,7 +502,11 @@ if ($result) {
|
||||
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
|
||||
print '</td>';
|
||||
|
||||
print '<td>' . $objp->country .'</td>';
|
||||
print '<td class="center">';
|
||||
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
|
||||
print $labelcountry;
|
||||
print '</td>';
|
||||
|
||||
print '<td>' . $objp->tva_intra . '</td>';
|
||||
|
||||
// Current account
|
||||
@ -516,7 +520,7 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Suggested accounting account
|
||||
print '<td class="center">';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ if ($object->id > 0)
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
$object->info($id);
|
||||
print dol_print_object_info($object, 1);
|
||||
dol_print_object_info($object, 1);
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -273,7 +273,7 @@ if (empty($reshook))
|
||||
{
|
||||
if (empty($login)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Login")), null, 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login")), null, 'errors');
|
||||
}
|
||||
}
|
||||
// Create new object
|
||||
@ -509,7 +509,7 @@ if (empty($reshook))
|
||||
{
|
||||
if (empty($login)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Login")), null, 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login")), null, 'errors');
|
||||
}
|
||||
else {
|
||||
$sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'";
|
||||
|
||||
@ -183,14 +183,14 @@ class Adherent extends CommonObject
|
||||
* @var integer
|
||||
*/
|
||||
public $datec;
|
||||
|
||||
|
||||
/**
|
||||
* Date modification record (tms)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $datem;
|
||||
|
||||
|
||||
public $datevalid;
|
||||
|
||||
public $gender;
|
||||
@ -596,7 +596,7 @@ class Adherent extends CommonObject
|
||||
{
|
||||
while ($obj=$this->db->fetch_object($resql2))
|
||||
{
|
||||
$this->type=$obj->label;
|
||||
$this->type=$obj->label;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1268,7 +1268,7 @@ class Adherent extends CommonObject
|
||||
$this->ref = $obj->rowid;
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
|
||||
|
||||
$this->civility_id = $obj->civility_code; // Bad. Kept for backard compatibility
|
||||
$this->civility_code = $obj->civility_code;
|
||||
$this->civility = $obj->civility_code?($langs->trans("Civility".$obj->civility_code) != ("Civility".$obj->civility_code) ? $langs->trans("Civility".$obj->civility_code) : $obj->civility_code):'';
|
||||
@ -2465,7 +2465,7 @@ class Adherent extends CommonObject
|
||||
*
|
||||
* @return array Tableau info des attributs
|
||||
*/
|
||||
private function _load_ldap_info()
|
||||
public function _load_ldap_info()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
@ -65,7 +65,7 @@ class AdherentType extends CommonObject
|
||||
* @var string Adherent type label
|
||||
*/
|
||||
public $label;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Adherent type nature
|
||||
*/
|
||||
@ -410,8 +410,8 @@ class AdherentType extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Return translated label by the nature of a adherent (physical or moral)
|
||||
*
|
||||
* @param string $morphy Nature of the adherent (physical or moral)
|
||||
@ -422,7 +422,7 @@ class AdherentType extends CommonObject
|
||||
global $langs;
|
||||
if ($morphy == 'phy') { return $langs->trans("Physical"); }
|
||||
elseif ($morphy == 'mor') { return $langs->trans("Moral"); }
|
||||
else return $langs->trans("Physical & Morale");
|
||||
else return $langs->trans("Physical & Morale");
|
||||
//return $morphy;
|
||||
}
|
||||
|
||||
@ -463,6 +463,7 @@ class AdherentType extends CommonObject
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
||||
*
|
||||
@ -472,7 +473,7 @@ class AdherentType extends CommonObject
|
||||
* 2=Return key only (uid=qqq)
|
||||
* @return string DN
|
||||
*/
|
||||
private function _load_ldap_dn($info, $mode = 0)
|
||||
public function _load_ldap_dn($info, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@ -485,12 +486,13 @@ class AdherentType extends CommonObject
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Initialize the info array (array of LDAP values) that will be used to call LDAP functions
|
||||
*
|
||||
* @return array Tableau info des attributs
|
||||
*/
|
||||
private function _load_ldap_info()
|
||||
public function _load_ldap_info()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
@ -43,13 +43,13 @@ if (empty($sortorder)) { $sortorder="ASC"; }
|
||||
if (empty($sortfield)) { $sortfield="d.login"; }
|
||||
if (! isset($statut))
|
||||
{
|
||||
$statut = 1 ;
|
||||
$statut = 1 ;
|
||||
}
|
||||
|
||||
if (! isset($cotis))
|
||||
{
|
||||
// by default, members must be up to date of subscription
|
||||
$cotis=1;
|
||||
// by default, members must be up to date of subscription
|
||||
$cotis=1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -130,6 +130,7 @@ $arrayfields=array(
|
||||
'd.note_private'=>array('label'=>$langs->trans("NotePrivate"), 'checked'=>0),*/
|
||||
'd.datefin'=>array('label'=>$langs->trans("EndSubscription"), 'checked'=>1, 'position'=>500),
|
||||
'd.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
'd.birth'=>array('label'=>$langs->trans("Birthday"), 'checked'=>0, 'position'=>500),
|
||||
'd.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
'd.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000)
|
||||
);
|
||||
@ -591,6 +592,12 @@ if (! empty($arrayfields['d.datec']['checked']))
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
//Birthday
|
||||
if (! empty($arrayfields['d.birth']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
// Date modification
|
||||
if (! empty($arrayfields['d.tms']['checked']))
|
||||
{
|
||||
@ -646,6 +653,7 @@ $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sort
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['d.datec']['checked'])) print_liste_field_titre($arrayfields['d.datec']['label'], $_SERVER["PHP_SELF"], "d.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['d.birth']['checked'])) print_liste_field_titre($arrayfields['d.birth']['label'], $_SERVER["PHP_SELF"], "d.birth", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['d.tms']['checked'])) print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['d.statut']['checked'])) print_liste_field_titre($arrayfields['d.statut']['label'], $_SERVER["PHP_SELF"], "d.statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
@ -865,6 +873,14 @@ while ($i < min($num, $limit))
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Birth
|
||||
if (! empty($arrayfields['d.birth']['checked']))
|
||||
{
|
||||
print '<td class="nowrap center">';
|
||||
print dol_print_date($db->jdate($obj->birth), 'day', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Date modification
|
||||
if (! empty($arrayfields['d.tms']['checked']))
|
||||
{
|
||||
|
||||
@ -235,7 +235,7 @@ else
|
||||
print '<br>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbytown">'.$langs->trans("MembersStatisticsByTown").'</a><br>';
|
||||
print '<br>';//+
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbyregion">'.$langs->trans("MembersStatisticsByRegion").'</a><br>';//+
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbyregion">'.$langs->trans("MembersStatisticsByRegion").'</a><br>';//+
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
@ -151,8 +151,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Member").'</td><td>';
|
||||
$filter='s.client in (1,2,3)';
|
||||
print $form->select_company($id,'memberid',$filter,1);
|
||||
print $form->select_company($id,'memberid','',1);
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("User").'</td><td>';
|
||||
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
|
||||
@ -306,7 +306,7 @@ if (! empty($arrayfields['d.fk_type']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_type" value="'.dol_escape_htmltag($search_type).'" size="7">';
|
||||
print'</td>';
|
||||
print'</td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.lastname']['checked']))
|
||||
@ -417,7 +417,7 @@ if (! empty($arrayfields['d.bank']['checked']))
|
||||
}
|
||||
if (! empty($arrayfields['c.dateadh']['checked']))
|
||||
{
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['c.datef']['checked']))
|
||||
{
|
||||
|
||||
@ -47,10 +47,10 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<td class="center"></td>
|
||||
<td class="center"><?php echo dol_print_date($objectlink->dateh, 'day'); ?></td>
|
||||
<td class="right"><?php
|
||||
if ($user->rights->adherent->lire) {
|
||||
$total = $total + $objectlink->amount;
|
||||
echo price($objectlink->amount);
|
||||
} ?></td>
|
||||
if ($user->rights->adherent->lire) {
|
||||
$total = $total + $objectlink->amount;
|
||||
echo price($objectlink->amount);
|
||||
} ?></td>
|
||||
<td class="right"></td>
|
||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||
</tr>
|
||||
|
||||
@ -281,9 +281,9 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
print '</td>';
|
||||
print '<td>'.dol_escape_htmltag($objp->label).'</td>';
|
||||
print '<td class="center">';
|
||||
if ($objp->morphy == 'phy') { print $langs->trans("Physical"); }
|
||||
elseif ($objp->morphy == 'mor') { print $langs->trans("Moral"); }
|
||||
else print $langs->trans("Physical & Morale");
|
||||
if ($objp->morphy == 'phy') { print $langs->trans("Physical"); }
|
||||
elseif ($objp->morphy == 'mor') { print $langs->trans("Moral"); }
|
||||
else print $langs->trans("Physical & Morale");
|
||||
print '</td>';
|
||||
print '<td class="center">'.yn($objp->subscription).'</td>';
|
||||
print '<td class="center">'.yn($objp->vote).'</td>';
|
||||
|
||||
@ -275,7 +275,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
@ -588,9 +588,8 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
|
||||
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START, 'SOCIETE_FISCAL_MONTH_START', 0, 1) . '</td></tr>';
|
||||
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START, 'SOCIETE_FISCAL_MONTH_START', 0, 1, 'maxwidth100') . '</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -987,7 +986,7 @@ else
|
||||
print '</script>';
|
||||
print "\n";
|
||||
$s.='<a href="#" onClick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>';
|
||||
$s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->trans("VATIntraCheck")), 1);
|
||||
$s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -256,7 +256,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -268,8 +268,8 @@ print $langs->trans("DescWeather").'<br>';
|
||||
|
||||
if($action == 'edit') {
|
||||
|
||||
$str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->trans('MeteoPercentageMod'));
|
||||
$str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->trans('MeteoStdMod'));
|
||||
$str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoPercentageMod'));
|
||||
$str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoStdMod'));
|
||||
if(empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $str_mode_enabled = $str_mode_std;
|
||||
else $str_mode_enabled = $str_mode_percentage;
|
||||
print '<a href="#" onclick="return false;" id="change_mode">'.$str_mode_enabled.'</a>';
|
||||
@ -418,7 +418,6 @@ if($action == 'edit') {
|
||||
print '<br></form>';
|
||||
} else {
|
||||
|
||||
// Boutons d'action
|
||||
print '<br><div class="tabsAction">';
|
||||
print '<a class="butAction" href="delais.php?action=edit">'.$langs->trans("Modify").'</a></div>';
|
||||
}
|
||||
|
||||
@ -1993,7 +1993,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
}
|
||||
if (! $transfound)
|
||||
{
|
||||
print '<input type="text" class="flat'.($class?' '.$class:'').'" value="'.(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
|
||||
print '<input type="text" class="flat'.($class?' '.$class:'').'" value="'.dol_escape_htmltag(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@ -608,9 +608,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
print '</td>';
|
||||
// Delete
|
||||
print '<td class="right">';
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editoperation&operationid='.$ruleaction['id'].'">'.img_edit().'</a>';
|
||||
print ' ';
|
||||
print '<td class="right nowraponall">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editoperation&operationid='.$ruleaction['id'].'">'.img_edit().'</a>';
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteoperation&operationid='.$ruleaction['id'].'">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -439,7 +439,7 @@ while ($i < min($num, $limit))
|
||||
$object->id = $obj->rowid;
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
if (isset($obj->$key)) $object->$key = $obj->$key;
|
||||
if (property_exists($obj, $key)) $object->$key = $obj->$key;
|
||||
}
|
||||
|
||||
// Show here line of result
|
||||
|
||||
@ -261,7 +261,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -66,8 +66,8 @@ else
|
||||
|
||||
if ($action == 'add' || GETPOST("modify"))
|
||||
{
|
||||
$external_rss_title = "external_rss_title_" . GETPOST("norss");
|
||||
$external_rss_urlrss = "external_rss_urlrss_" . GETPOST("norss");
|
||||
$external_rss_title = "external_rss_title_" . GETPOST("norss", 'int');
|
||||
$external_rss_urlrss = "external_rss_urlrss_" . GETPOST("norss", 'int');
|
||||
|
||||
if (! empty($_POST[$external_rss_urlrss]))
|
||||
{
|
||||
@ -95,7 +95,7 @@ if ($action == 'add' || GETPOST("modify"))
|
||||
{
|
||||
// Ajoute boite box_external_rss dans definition des boites
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, note)";
|
||||
$sql.= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss").' ('.GETPOST($external_rss_title)).")')";
|
||||
$sql.= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss", 'int').' ('.GETPOST($external_rss_title, 'alpha')).")')";
|
||||
if (! $db->query($sql))
|
||||
{
|
||||
dol_print_error($db);
|
||||
@ -103,8 +103,8 @@ if ($action == 'add' || GETPOST("modify"))
|
||||
}
|
||||
}
|
||||
|
||||
$result1=dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_" . GETPOST("norss"), GETPOST($external_rss_title), 'chaine', 0, '', $conf->entity);
|
||||
if ($result1) $result2=dolibarr_set_const($db, "EXTERNAL_RSS_URLRSS_" . GETPOST("norss"), GETPOST($external_rss_urlrss), 'chaine', 0, '', $conf->entity);
|
||||
$result1=dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_" . GETPOST("norss", 'int'), GETPOST($external_rss_title, 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
if ($result1) $result2=dolibarr_set_const($db, "EXTERNAL_RSS_URLRSS_" . GETPOST("norss", 'int'), GETPOST($external_rss_urlrss, 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if ($result1 && $result2)
|
||||
{
|
||||
@ -122,13 +122,13 @@ if ($action == 'add' || GETPOST("modify"))
|
||||
|
||||
if ($_POST["delete"])
|
||||
{
|
||||
if(GETPOST("norss"))
|
||||
if (GETPOST("norss", 'int'))
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
// Supprime boite box_external_rss de definition des boites
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes_def";
|
||||
$sql.= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss"))." %'";
|
||||
$sql.= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss", 'int'))." %'";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
@ -168,8 +168,8 @@ if ($_POST["delete"])
|
||||
}
|
||||
|
||||
|
||||
$result1=dolibarr_del_const($db, "EXTERNAL_RSS_TITLE_" . GETPOST("norss"), $conf->entity);
|
||||
if ($result1) $result2=dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_" . GETPOST("norss"), $conf->entity);
|
||||
$result1=dolibarr_del_const($db, "EXTERNAL_RSS_TITLE_".GETPOST("norss", 'int'), $conf->entity);
|
||||
if ($result1) $result2=dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_".GETPOST("norss", 'int'), $conf->entity);
|
||||
|
||||
if ($result1 && $result2)
|
||||
{
|
||||
@ -270,13 +270,13 @@ if ($resql)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td width=\"100px\">".$langs->trans("Title")."</td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_" . $idrss . "\" value=\"" . $conf->global->$keyrsstitle . "\"></td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_" . $idrss . "\" value=\"" . dol_escape_htmltag($conf->global->$keyrsstitle) . "\"></td>";
|
||||
print "</tr>";
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("URL")."</td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_" . $idrss . "\" value=\"" . $conf->global->$keyrssurl . "\"></td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_" . $idrss . "\" value=\"" . dol_escape_htmltag($conf->global->$keyrssurl) . "\"></td>";
|
||||
print "</tr>";
|
||||
|
||||
|
||||
|
||||
@ -352,7 +352,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -331,7 +331,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -257,7 +257,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user');
|
||||
|
||||
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
||||
$link='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
||||
//$link.=$langs->trans("Disable");
|
||||
$link.=img_picto($langs->trans("Activated"), 'switch_on');
|
||||
$link.='</a>';
|
||||
|
||||
@ -519,7 +519,7 @@ else
|
||||
{
|
||||
dol_fiche_head($head, 'common', '', -1);
|
||||
|
||||
print $langs->trans("EMailsDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -396,7 +396,7 @@ else
|
||||
{
|
||||
dol_fiche_head($head, 'common_emailing', '', -1);
|
||||
|
||||
print $langs->trans("EMailsDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
@ -493,7 +493,8 @@ else
|
||||
}
|
||||
|
||||
|
||||
// Boutons actions
|
||||
// Buttons for actions
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||
|
||||
@ -406,7 +406,7 @@ while ($i < min($num, $limit))
|
||||
$object->id = $obj->rowid;
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
if (isset($obj->$key)) $object->$key = $obj->$key;
|
||||
if (property_exists($obj, $key)) $object->$key = $obj->$key;
|
||||
}
|
||||
|
||||
// Show here line of result
|
||||
|
||||
@ -177,13 +177,13 @@ if ($action == 'add')
|
||||
}
|
||||
if (! $error && ! $_POST['url'])
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("URL")), null, 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("URL")), null, 'errors');
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
if (! $error && ! $_POST['titre'])
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Title")), null, 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors');
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
@ -415,7 +415,6 @@ if ($action == 'create')
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
// Boutons
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
|
||||
@ -45,6 +45,34 @@ $action = GETPOST('action', 'alpha');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
|
||||
if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
|
||||
{
|
||||
$code=$reg[1];
|
||||
$value=GETPOST($code, 'alpha');
|
||||
if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
|
||||
{
|
||||
$code=$reg[1];
|
||||
if (dolibarr_del_const($db, $code, 0) > 0)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'add_currency')
|
||||
{
|
||||
$error=0;
|
||||
@ -91,7 +119,10 @@ elseif ($action == 'update_currency')
|
||||
{
|
||||
if ($currency->fetch($fk_multicurrency) > 0)
|
||||
{
|
||||
$currency->updateRate($rate);
|
||||
$result=$currency->updateRate($rate);
|
||||
if ($result<0) {
|
||||
setEventMessages(null, $currency->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
/* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -17,16 +17,13 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/openinghours.php
|
||||
* \ingroup accountant
|
||||
* \brief Setup page to configure accountant / auditor
|
||||
* \ingroup core
|
||||
* \brief Setup page to configure opening hours
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
|
||||
$action=GETPOST('action', 'aZ09');
|
||||
$contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'adminaccoutant'; // To manage different context of search
|
||||
@ -50,19 +47,13 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
if ( ($action == 'update' && ! GETPOST("cancel", 'alpha'))
|
||||
|| ($action == 'updateedit') )
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id', 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'none'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_OPENINGHOURS_MONDAY", GETPOST("monday", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_OPENINGHOURS_TUESDAY", GETPOST("tuesday", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_OPENINGHOURS_WEDNESDAY", GETPOST("wednesday", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_OPENINGHOURS_THURSDAY", GETPOST("thursday", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_OPENINGHOURS_FRIDAY", GETPOST("friday", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_OPENINGHOURS_SATURDAY", GETPOST("saturday", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_OPENINGHOURS_SUNDAY", GETPOST('sunday', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if ($action != 'updateedit' && ! $error)
|
||||
{
|
||||
@ -85,10 +76,6 @@ $head = company_admin_prepare_head();
|
||||
dol_fiche_head($head, 'openinghours', $langs->trans("Company"), -1, 'company');
|
||||
|
||||
$form=new Form($db);
|
||||
$formother=new FormOther($db);
|
||||
$formcompany=new FormCompany($db);
|
||||
|
||||
$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("OpeningHoursDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
@ -98,15 +85,6 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
/**
|
||||
* Edit parameters
|
||||
*/
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print '$(document).ready(function () {
|
||||
$("#selectcountry_id").change(function() {
|
||||
document.form_index.action.value="updateedit";
|
||||
document.form_index.submit();
|
||||
});
|
||||
});';
|
||||
print '</script>'."\n";
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
@ -114,58 +92,28 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("Day").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||
|
||||
// Name
|
||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||
print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_NAME?$conf->global->MAIN_INFO_ACCOUNTANT_NAME: GETPOST("nom", 'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td><label for="monday">'.$langs->trans("Monday").'</label></td><td>';
|
||||
print '<input name="monday" id="monday" class="minwidth100" value="'. ($conf->global->MAIN_INFO_OPENINGHOURS_MONDAY?$conf->global->MAIN_INFO_OPENINGHOURS_MONDAY: GETPOST("monday", 'alpha')) . '" autofocus="autofocus"></td></tr>'."\n";
|
||||
|
||||
// Address
|
||||
print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
||||
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS?$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS: GETPOST("address", 'nohtml')) . '</textarea></td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td><label for="tuesday">'.$langs->trans("Tuesday").'</label></td><td>';
|
||||
print '<input name="tuesday" id="tuesday" class="minwidth100" value="'. ($conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY?$conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY: GETPOST("tuesday", 'alpha')) . '"></td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_ZIP?$conf->global->MAIN_INFO_ACCOUNTANT_ZIP: GETPOST("zipcode", 'alpha')) . '"></td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td><label for="wednesday">'.$langs->trans("Wednesday").'</label></td><td>';
|
||||
print '<input name="wednesday" id="wednesday" class="minwidth100" value="'. ($conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY?$conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY: GETPOST("wednesday", 'alpha')) . '"></td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
||||
print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_TOWN?$conf->global->MAIN_INFO_ACCOUNTANT_TOWN: GETPOST("town", 'nohtml')) . '"></td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td><label for="thursday">'.$langs->trans("Thursday").'</label></td><td>';
|
||||
print '<input name="thursday" id="thursday" class="minwidth100" value="'. ($conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY?$conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY: GETPOST("thursday", 'alpha')) . '"></td></tr>'."\n";
|
||||
|
||||
// Country
|
||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
||||
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
|
||||
print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
print '</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td><label for="friday">'.$langs->trans("Friday").'</label></td><td>';
|
||||
print '<input name="friday" id="friday" class="minwidth100" value="'. ($conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY?$conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY: GETPOST("friday", 'alpha')) . '"></td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
|
||||
$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id');
|
||||
print '</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td><label for="saturday">'.$langs->trans("Saturday").'</label></td><td>';
|
||||
print '<input name="saturday" id="saturday" class="minwidth100" value="'. ($conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY?$conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY: GETPOST("saturday", 'alpha')) . '"></td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
||||
print '<input name="tel" id="phone" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_PHONE . '"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td><label for="sunday">'.$langs->trans("Sunday").'</label></td><td>';
|
||||
print '<input name="sunday" id="sunday" class="minwidth100" value="'. ($conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY?$conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY: GETPOST("sunday", 'alpha')) . '"></td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
||||
print '<input name="fax" id="fax" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_FAX . '"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||
print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_MAIL . '"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Web
|
||||
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||
print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_WEB . '"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Code
|
||||
print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
|
||||
print '<input name="code" id="code" class="minwidth100" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_CODE?$conf->global->MAIN_INFO_ACCOUNTANT_CODE: GETPOST("code", 'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
|
||||
|
||||
// Note
|
||||
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
||||
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
@ -182,39 +130,17 @@ else
|
||||
* Show parameters
|
||||
*/
|
||||
|
||||
// Actions buttons
|
||||
//print '<div class="tabsAction">';
|
||||
//print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||
//print '</div><br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Day").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Monday").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Tuesday").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Wednesday").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Thursday").'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY))
|
||||
{
|
||||
$code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2);
|
||||
$img=picto_from_langcode($code);
|
||||
print $img?$img.' ':'';
|
||||
print getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Friday").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Saturday").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Sunday").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Monday").'</td><td>' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_MONDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_MONDAY) . '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Tuesday").'</td><td>' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY) . '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Wednesday").'</td><td>' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY) . '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Thursday").'</td><td>' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY) . '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Friday").'</td><td>' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY) . '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Saturday").'</td><td>' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY) . '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Sunday").'</td><td>' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY) . '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print "</div>";
|
||||
|
||||
@ -183,7 +183,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -61,6 +61,8 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", $_POST["MAIN_PROFID5_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID6_IN_ADDRESS", $_POST["MAIN_PROFID6_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", $_POST["MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"], 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", $_POST["MAIN_TVAINTRA_NOT_IN_ADDRESS"], 'chaine', 0, '', $conf->entity);
|
||||
@ -177,76 +179,25 @@ if ($action == 'edit') // Edit
|
||||
print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS', (! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Show prof id 1 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
// Show prof id in address into pdf
|
||||
for($i=1; $i<=6; $i++)
|
||||
{
|
||||
$pid1=$langs->transcountry("ProfId1", $mysoc->country_code);
|
||||
if ($pid1 == '-') $pid1=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid1 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid1)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
|
||||
print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS', isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 2 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid2=$langs->transcountry("ProfId2", $mysoc->country_code);
|
||||
if ($pid2 == '-') $pid2=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid2 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid2)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
|
||||
print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS', isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 3 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid3=$langs->transcountry("ProfId3", $mysoc->country_code);
|
||||
if ($pid3 == '-') $pid3=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid3 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid3)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
|
||||
print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS', isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 4 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid4=$langs->transcountry("ProfId4", $mysoc->country_code);
|
||||
if ($pid4 == '-') $pid4=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid4 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid4)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
|
||||
print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS', isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid=$langs->transcountry("ProfId".$i, $mysoc->country_code);
|
||||
if ($pid == '-') $pid=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid.'</td><td>';
|
||||
$keyforconstant = 'MAIN_PROFID'.$i.'_IN_ADDRESS';
|
||||
print $form->selectyesno($keyforconstant, isset($conf->global->$keyforconstant)?$conf->global->$keyforconstant:0, 1, $noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@ -419,77 +370,26 @@ else // Show
|
||||
print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Show prof id 1 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid1=$langs->transcountry("ProfId1", $mysoc->country_code);
|
||||
if ($pid1 == '-') $pid1=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid1 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid1)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
|
||||
print yn($conf->global->MAIN_PROFID1_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 2 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid2=$langs->transcountry("ProfId2", $mysoc->country_code);
|
||||
if ($pid2 == '-') $pid2=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid2 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid2)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
|
||||
print yn($conf->global->MAIN_PROFID2_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 3 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid3=$langs->transcountry("ProfId3", $mysoc->country_code);
|
||||
if ($pid3 == '-') $pid3=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid3 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid3)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
|
||||
print yn($conf->global->MAIN_PROFID3_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Show prof id 4 in address into pdf
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid4=$langs->transcountry("ProfId4", $mysoc->country_code);
|
||||
if ($pid4 == '-') $pid4=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid4 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid4)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
|
||||
print yn($conf->global->MAIN_PROFID4_IN_ADDRESS, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
// Show prof id in address into pdf
|
||||
for ($i=1; $i<=6; $i++)
|
||||
{
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid=$langs->transcountry("ProfId".$i, $mysoc->country_code);
|
||||
if ($pid == '-') $pid=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pid = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
}
|
||||
if ($pid)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid.'</td><td>';
|
||||
$keyforconstant = 'MAIN_PROFID'.$i.'_IN_ADDRESS';
|
||||
print yn($conf->global->$keyforconstant, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
@ -314,7 +314,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -243,7 +243,7 @@ else
|
||||
print '</table>';
|
||||
|
||||
|
||||
// Boutons actions
|
||||
// Buttons for actions
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
|
||||
@ -64,10 +64,10 @@ if ($action == 'update' || $action == 'add')
|
||||
$constnote=$_POST["constnote"][$key];
|
||||
|
||||
$res=dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
@ -123,9 +123,9 @@ $head = mailmanspip_admin_prepare_head();
|
||||
if (! empty($conf->global->ADHERENT_USE_SPIP))
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
|
||||
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
||||
|
||||
|
||||
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_SPIP">';
|
||||
//$link.=$langs->trans("Disable");
|
||||
@ -141,25 +141,25 @@ if (! empty($conf->global->ADHERENT_USE_SPIP))
|
||||
|
||||
print load_fiche_titre($langs->trans('SPIPTitle'), $link, '');
|
||||
print '<br>';
|
||||
|
||||
|
||||
form_constantes($constantes, 2);
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Update").'" name="update"></div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
||||
|
||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_SPIP">';
|
||||
|
||||
$link='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_SPIP">';
|
||||
//$link.=$langs->trans("Activate");
|
||||
$link.=img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
$link.='</a>';
|
||||
print load_fiche_titre($langs->trans('SPIPTitle'), $link, '');
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@ -276,7 +276,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -178,7 +178,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
// TODO We add/delete permission here until permission can have a condition on a global var
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
||||
$newmodule=new modFournisseur($db);
|
||||
|
||||
|
||||
if ($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)
|
||||
{
|
||||
// clear default rights array
|
||||
@ -191,7 +191,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
$newmodule->rights[$r][3] = 0;
|
||||
$newmodule->rights[$r][4] = 'commande';
|
||||
$newmodule->rights[$r][5] = 'approve2';
|
||||
|
||||
|
||||
// Insert
|
||||
$newmodule->insert_permissions(1);
|
||||
}
|
||||
@ -199,7 +199,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
{
|
||||
// Remove all rights with Permission1190
|
||||
$newmodule->delete_permissions();
|
||||
|
||||
|
||||
// Add all right without Permission1190
|
||||
$newmodule->insert_permissions(1);
|
||||
}
|
||||
@ -306,7 +306,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -268,7 +268,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -283,7 +283,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -36,7 +36,13 @@ $action=GETPOST('action', 'alpha');
|
||||
|
||||
if ($action == 'convert')
|
||||
{
|
||||
$db->query("alter table ".$_GET["table"]." ENGINE=INNODB");
|
||||
$sql="ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." ENGINE=INNODB";
|
||||
$db->query($sql);
|
||||
}
|
||||
if ($action == 'convertutf8')
|
||||
{
|
||||
$sql="ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." CHARACTER SET utf8 COLLATE utf8_unicode_ci";
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
|
||||
@ -111,23 +117,28 @@ else
|
||||
|
||||
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a></td>';
|
||||
print '<td>'.$obj->Engine.'</td>';
|
||||
if (isset($row[1]) && $row[1] == "MyISAM")
|
||||
if (isset($obj->Engine) && $obj->Engine == "MyISAM")
|
||||
{
|
||||
print '<td><a href="database-tables.php?action=convert&table='.$row[0].'">'.$langs->trans("Convert").'</a></td>';
|
||||
print '<td><a class="reposition" href="database-tables.php?action=convert&table='.$obj->Name.'">'.$langs->trans("Convert").' InnoDB</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print '<td>'.$obj->Row_format.'</td>';
|
||||
print '<td class="right">'.$obj->Rows.'</td>';
|
||||
print '<td class="right">'.$obj->Avg_row_length.'</td>';
|
||||
print '<td class="right">'.$obj->Data_length.'</td>';
|
||||
print '<td class="right">'.$obj->Max_data_length.'</td>';
|
||||
print '<td class="right">'.$obj->Index_length.'</td>';
|
||||
print '<td class="right">'.$obj->Auto_increment.'</td>';
|
||||
print '<td class="right">'.$obj->Check_time.'</td>';
|
||||
print '<td class="right">'.$obj->Collation.'</td>';
|
||||
print '<td align="right">'.$obj->Rows.'</td>';
|
||||
print '<td align="right">'.$obj->Avg_row_length.'</td>';
|
||||
print '<td align="right">'.$obj->Data_length.'</td>';
|
||||
print '<td align="right">'.$obj->Max_data_length.'</td>';
|
||||
print '<td align="right">'.$obj->Index_length.'</td>';
|
||||
print '<td align="right">'.$obj->Auto_increment.'</td>';
|
||||
print '<td align="right">'.$obj->Check_time.'</td>';
|
||||
print '<td align="right">'.$obj->Collation;
|
||||
if (isset($obj->Collation) && ($obj->Collation == "utf8mb4_general_ci" || $obj->Collation == "utf8mb4_unicode_ci"))
|
||||
{
|
||||
print '<br><a class="reposition" href="database-tables.php?action=convertutf8&table='.$obj->Name.'">'.$langs->trans("Convert").' UTF8</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ $head = ticketAdminPrepareHead();
|
||||
|
||||
dol_fiche_head($head, 'settings', $langs->trans("Module56000Name"), -1, "ticket");
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("TicketSetupDictionaries") . '</span> : <a href="' . dol_buildpath('/admin/dict.php', 1) . '" >' . dol_buildpath('/admin/dict.php', 2) . '</a><br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("TicketSetupDictionaries") . '</span> : <a href="'.DOL_URL_ROOT.'/admin/dict.php">'.$langs->trans("ClickHereToGoTo", $langs->transnoentitiesnoconv("DictionarySetup")).'</a><br>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@ -259,7 +259,7 @@ foreach ($dirmodels as $reldir) {
|
||||
if ($conf->global->TICKET_ADDON == 'mod_' . $classname) {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmod&value=mod_' . $classname . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=setmod&value=mod_' . $classname . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -36,6 +36,8 @@ $export_type=GETPOST('export_type', 'alpha');
|
||||
$file=GETPOST('zipfilename_template', 'alpha');
|
||||
$compression = GETPOST('compression');
|
||||
|
||||
$file = dol_sanitizeFileName($file);
|
||||
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
$page = GETPOST("page", 'int');
|
||||
@ -57,10 +59,11 @@ $errormsg='';
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
|
||||
$ret=dol_delete_file($file, 1);
|
||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
|
||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
|
||||
$filerelative = dol_sanitizeFileName(GETPOST('urlfile', 'alpha'));
|
||||
$filepath=$conf->admin->dir_output.'/'.$filerelative;
|
||||
$ret=dol_delete_file($filepath, 1);
|
||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", $filerelative), null, 'mesgs');
|
||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", $filerelative), null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
|
||||
|
||||
@ -48,6 +48,17 @@ if (! empty($conf->syslog->enabled))
|
||||
*/
|
||||
if ($action=='purge' && ! preg_match('/^confirm/i', $choice) && ($choice != 'allfiles' || $confirm == 'yes') )
|
||||
{
|
||||
// Increase limit of time. Works only if we are not in safe mode
|
||||
$ExecTimeLimit=600;
|
||||
if (!empty($ExecTimeLimit))
|
||||
{
|
||||
$err=error_reporting();
|
||||
error_reporting(0); // Disable all errors
|
||||
//error_reporting(E_ALL);
|
||||
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
|
||||
error_reporting($err);
|
||||
}
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
|
||||
$utils = new Utils($db);
|
||||
$result = $utils->purgeFiles($choice);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user