Merge branch 'develop' into develo#2
This commit is contained in:
commit
a29f997fcd
156
ChangeLog
156
ChangeLog
@ -7,20 +7,22 @@ English Dolibarr ChangeLog
|
||||
|
||||
For users:
|
||||
----------
|
||||
NEW: Feature to make inventories
|
||||
NEW: Several security issues after a second private bug bounty campaign.
|
||||
NEW: Module Recruitement to follow application to job positions is now stable.
|
||||
NEW: Feature to make Stock Inventories
|
||||
NEW: Several security issues after a second private bug hunting campaign.
|
||||
NEW: Add a security center page with all information and advices related to the security of your instance
|
||||
NEW: Add a performance center page with all information and advices related to the performance of your instance
|
||||
NEW: A lot of fix into english text after a small proofreading campaign (still not perfect, but really better)
|
||||
NEW: All main menu entries are using the picto of the module
|
||||
NEW: Accountancy - Add closure menu
|
||||
NEW: Add a copy to clipboard button on some fields
|
||||
NEW: Add an example of scheduled job to send email reminder for unpayed invoices
|
||||
NEW: Accountancy - Add FEC import
|
||||
NEW: Accountancy - Add formconfirm with options on export
|
||||
NEW: Accountancy - Add a confirmation form with options on export
|
||||
NEW: Accountancy - Add select date from/to in already bind customer and supplier list
|
||||
NEW: Accountancy - Format FEC - Add new field DateLimitReglmt
|
||||
NEW: Accountancy - In ledger & journals, show link on bank transaction
|
||||
NEW: Accountancy - Possibility to filter on journals in balance
|
||||
NEW: Accountancy - Add a page to list subledger accounts on product/company
|
||||
NEW: Accountancy - Add a page to list subledger accounts
|
||||
NEW: add the Channel column into the list of orders
|
||||
NEW: Add a check to avoid an invoice date in the future
|
||||
NEW: Add some color and picto for the direction of movement
|
||||
@ -28,9 +30,9 @@ NEW: Add the column "alias" of company in the list of proposal, order, invoice
|
||||
NEW: Add the column "Office phone" and "User mobile" in user list
|
||||
NEW: Add the column "Price level"in thirdparty list
|
||||
NEW: Add some company information in the dropdown login menu
|
||||
NEW: Add constant MAIN_BUGTRACK_URL to set url to redirect to on link "declare a bug"
|
||||
NEW: Add constant MAIN_BUGTRACK_URL to set a custom url to redirect to when clicking on link "declare a bug"
|
||||
NEW: Add contact tag and bulk email status on the thirparty+contact create form
|
||||
NEW: Add db fields note_public note_private for ECM module
|
||||
NEW: Add db fields note_public and note_private for ECM module
|
||||
NEW: Manage deposit on supplier invoice (& somes ajustments)
|
||||
NEW: Add edit/delete action icons on categories list pages
|
||||
NEW: Add hidden option to auto load input line extrafield into new lines
|
||||
@ -38,28 +40,24 @@ NEW: Add import profile to import BOM
|
||||
NEW: Add last date of modification for website pages in the list of pages
|
||||
NEW: Add link picto to the stock movement on the detail of production
|
||||
NEW: Add mass action "Set tag" for product/service, user, thirdparty, warehouse, project, bank account, members
|
||||
NEW: Add Mass action order validate and set to billed
|
||||
NEW: add massActions to set a commercial proposal to status "Refused"
|
||||
NEW: Add option CONTRACT_ALLOW_EXTERNAL_DOWNLOAD and SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD
|
||||
NEW: Add option MAIN_SECURITY_ANTI_SSRF_SERVER_IP
|
||||
NEW: Add bulk action Validate and Set to billed on order list.
|
||||
NEW: add bulk action to set a commercial proposal to status "Refused"
|
||||
NEW: Add option CONTRACT_ALLOW_EXTERNAL_DOWNLOAD and SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD to make generated doc automatically shared.
|
||||
NEW: Add option MAIN_SECURITY_ANTI_SSRF_SERVER_IP to define list of IPs that are local IPs
|
||||
NEW: Add option SOCIETE_DISABLE_WORKFORCE to hide staff field
|
||||
NEW: Add pagination at Get Products response
|
||||
NEW: Add new permission "Export website"
|
||||
NEW: Add a new permission "Export website"
|
||||
NEW: Add possibility to exports userGroups fields on user exports
|
||||
NEW: Add price min and price min including tax into product export
|
||||
NEW: Can search on lots or serials into the quick search bar
|
||||
NEW: Add support for Friday as a non working day
|
||||
NEW: Add a total in agent margin & uniformize code
|
||||
NEW: add total margin in invoice list
|
||||
NEW: Can set a Warehouse on Thirparty
|
||||
NEW: Add a total in page of margin by user
|
||||
NEW: Add the total of margin in invoice list
|
||||
NEW: Can set a Warehouse on a Thirparty
|
||||
NEW: auto notification with module Notification can use templated emails
|
||||
NEW: Bank Entries : add verif fk_user addPaymentToBank Social Contribution
|
||||
NEW: Bank Entries : display user linked to a salary or a taxes
|
||||
NEW: better date_valid on invoice
|
||||
NEW: Can ask the warehouse in proposal
|
||||
NEW: Can set a warehouse in a proposal
|
||||
NEW: Can clone a cron job.
|
||||
NEW: Can create a lot from list
|
||||
NEW: Can edit object in module builder
|
||||
NEW: Can create a lot from the list view (Look and feel standardization).
|
||||
NEW: Can filter files in GED on status Shared/Not shared
|
||||
NEW: Can filter on extrafields date on lists
|
||||
NEW: Can filter on rowid in list of blocked logs.
|
||||
@ -68,73 +66,69 @@ NEW: Can set an employee on each social contribution
|
||||
NEW: Can set a percentage when creating an invoice from another object
|
||||
NEW: Can set if a ticket group is visible on public interface or not.
|
||||
NEW: Can set order of execution of hooks
|
||||
NEW: Can show the holidays on the agenda view.
|
||||
NEW: Can show the project ref or label into PDF documents
|
||||
NEW: Can show the leave dates/holidays on the agenda view.
|
||||
NEW: Can show the project ref into PDF documents
|
||||
NEW: Can toggle FCKeditor on public/private notes
|
||||
NEW: Can use captcha on public page to create a ticket
|
||||
NEW: Check update for externals modules using button on module page
|
||||
NEW: choose lines while creating intervention card from origin
|
||||
NEW: Column shippement method, payment mode, payment term in propal and order list
|
||||
NEW: Conf for default actiomm status when created from card
|
||||
NEW: Conf for default actiomm status when created from card (and DefaultValues CRUD class)
|
||||
NEW: customer price customer ref: push back to v14
|
||||
NEW: Check update availability for externals modules using a button on module page
|
||||
NEW: Choose lines to use while creating intervention card from origin
|
||||
NEW: Column shippement method, payment mode, payment term in proposal and order list
|
||||
NEW: Conf for default actiomm status
|
||||
NEW: customer ref for product customer prices
|
||||
NEW: date and user signature on proposal (Issue 16062)
|
||||
NEW: Dictionary for availability - Add column position
|
||||
NEW: Dictionary for availability - Add a column position
|
||||
NEW: TAKEPOS delayed payment in TakePOS
|
||||
NEW: TAKEPOS display date range if exist in TakePOS
|
||||
NEW: TAKEPOS display resiliate status in TakePOS for member
|
||||
NEW: TAKEPOS Edit sales lines rights in TakePOS
|
||||
NEW: Extrafields of documents lines are inside the lines, not any more on separate TR
|
||||
NEW: TAKEPOS Option for Takepos to show the total price without tax
|
||||
NEW: TAKEPOS More permission in TakePOS (Can edit added line, can modify once order sent to kitchen)
|
||||
NEW: Can set a user related to a social contribution
|
||||
NEW: ICS Direct debit can be set with a different value for each bank account
|
||||
NEW: LDAP: usergroup search can be filtered
|
||||
NEW: Make public bookmarks editable by admin users only
|
||||
NEW: If no logo defined, can use the squarred logo on login page
|
||||
NEW: If main logo not defined, can use the squarred logo on login page
|
||||
NEW: The manifest file can use the squared image if available
|
||||
NEW: Add buld actions for Bank Transfer
|
||||
NEW: Add bulk actions for Bank Transfer
|
||||
NEW: Enhance the multicurrency rate editor
|
||||
NEW: migration script
|
||||
NEW: More permission in TakePOS (Can edit added line, can modify once order sent to kitchen)
|
||||
NEW: Multiselect ledger account code filter on book keeping list
|
||||
NEW: Normalyse Type company field with ajax combobox
|
||||
NEW: TAKEPOS: option for Takepos to show the total price without tax
|
||||
NEW: option to automatically close an open project when all its tasks are done (=progress 100%)
|
||||
NEW: option to select membership type on the online payment page for membership subscription or renewal
|
||||
NEW: preload product description on selection for customer propal/order/invoice
|
||||
NEW: Add a ref in product customer price
|
||||
NEW: Save old page with .old extension on disk when editing a website page
|
||||
NEW: Search usergroups & resources
|
||||
NEW: Set status of all variant when setting status of parent
|
||||
NEW: Setup Page for module create with module builder enhancement #FoundationFunding
|
||||
NEW: Set status of all variants when changing status of parent
|
||||
NEW: Setup Page for module creation with module builder enhancement #FoundationFunding
|
||||
NEW: Show picto of module into the list of dictionaries
|
||||
NEW: Show the total of payment on the payment confirm page
|
||||
NEW: Show the total of payment on the payment confirmation page
|
||||
NEW: Stock movement list - Add more complete date field
|
||||
NEW: Support color for types of event
|
||||
NEW: The setup for Mandatory field can now be done on combo list too.
|
||||
NEW: The global setup for Mandatory fields can now be done on combo list too.
|
||||
NEW: translate in "en_US" to complete PR 16980
|
||||
NEW: unit selection on object edit line
|
||||
NEW: Update the list of taxes available by default for France
|
||||
NEW: Add captcha on public page to create a ticket
|
||||
NEW: Salary payment request and Salary payment are 2 different steps in workflow on Salary payment recording
|
||||
NEW: VAT payment request and VAT payment are now 2 different steps in workflow on VAT payment recording
|
||||
NEW: VAT report - Optimisation & collapse by rate
|
||||
NEW: When we add contacts/users to Project, ask to also affect them on project tasks
|
||||
NEW: When we add contacts/users to a project, ask to also affect them on tasks.
|
||||
NEW: When a doc file is shared, link is visible from the main page of doc.
|
||||
NEW: Workflow to set a shipment as closed.
|
||||
NEW: Add option in Workflow module to set a shipment as closed.
|
||||
NEW: Option to automatically create a login/user when a new subscription of a member is done online
|
||||
NEW: #16378 More E-Mail Contact substitution Values for better salutation
|
||||
NEW: #13739 #17390 Product API route added to get product stock and product with or without variants
|
||||
NEW: option to leave the "Automatically create a total payment" checkbox empty on the tax creation page
|
||||
NEW: option to keep the "Automatically create a total payment" checkbox empty on the tax creation page
|
||||
NEW: #17113 Can upload a favicon in website module
|
||||
NEW: #17292 default subscription amount by adherent type
|
||||
NEW: start new experimental module Event Organization Management
|
||||
NEW: start new experimental module Partnership Management
|
||||
NEW: start new experimental module Knowledge Management
|
||||
NEW: start new experimental module Workstations management
|
||||
|
||||
|
||||
For developers:
|
||||
---------------
|
||||
NEW: start new module Event Organization Management
|
||||
NEW: start new module Partnership Management
|
||||
NEW: start new module Knowledge Management
|
||||
NEW: start new module Workstations management
|
||||
NEW: Can edit an object property in module builder
|
||||
NEW: hook printFieldListTitle for cabyprodserv.php
|
||||
NEW: Hook to allow external modules to add their own shortlist of recent objects
|
||||
NEW: SQL-altering hooks in the turnover by product report
|
||||
@ -142,7 +136,6 @@ NEW: Add data-eec=1 for EEC countries on select for js interaction
|
||||
NEW: Add experimental repair script to switch to dynamic row format and utf8mb4 encoding
|
||||
NEW: add form confirm hook on company card
|
||||
NEW: Add function showValueWithClipboardCPButton() to add a copy/paste
|
||||
NEW: Add function showValueWithCopyAndPasteButton() to add a copy/paste
|
||||
NEW: Add hook addSectionECMAuto method to add custom diretory into ECM auto files
|
||||
NEW: Add native compression in rest apis
|
||||
NEW: Product Variants API, add variant stock to response by parameter
|
||||
@ -156,6 +149,11 @@ NEW: API Add option $includeifobjectisused to get a product
|
||||
NEW: API Get the list of product ids only
|
||||
NEW: Can set a target image in dolcropresize function.
|
||||
NEW: Can set a label as placeholder for combo lists.
|
||||
NEW: Add pagination on Get Products response API
|
||||
NEW: Add the DefaultValues CRUD class
|
||||
NEW: Extrafields of documents lines are inside the lines, not any more on separate TR
|
||||
NEW: unit selection on object edit line
|
||||
NEW: #13739 #17390 Product API route added to get product stock and product with or without variants
|
||||
|
||||
|
||||
WARNING:
|
||||
@ -171,6 +169,64 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Function set_price_level() has been renamed into setPriceLevel() to follow camelcase rules
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.3 compared to 13.0.2 *****
|
||||
|
||||
FIX: 13.0 warning - missing quotes around 'label'
|
||||
FIX: #16143 Old PG requires "()" on DROP FUNCTION
|
||||
FIX: #16843
|
||||
FIX: #17060
|
||||
FIX: #17192 - With tz < 0, event is show in bad day on calendar views
|
||||
FIX: #17363
|
||||
FIX: #17476 releve.php: Fix SQL statement
|
||||
FIX: Accountancy - Import in general ledger
|
||||
FIX: Accountancy - Quadra export - wrong data on credit
|
||||
FIX: Accountancy - Warning on the pages of the preparatory statements of accounting entries
|
||||
FIX: Add function price2num for rounding values in productAlertStock box
|
||||
FIX: Add parameter to function price2num()
|
||||
FIX: Cannot delete a batch material from item receipts
|
||||
FIX: cast int
|
||||
FIX: Change parameters MF to MS for price2num() function
|
||||
FIX: create event from contact card preselect contact correctly
|
||||
FIX: create sociales : keep values error form
|
||||
FIX: dol_print_date for %a and %b with some timezone
|
||||
FIX: email is not case sensitive
|
||||
FIX: error for duplicate thirdparty found correctly returned by ws
|
||||
FIX: Espadon PDF shippment model with long public note now wroking
|
||||
FIX: esupplier order: error 500 when using packaging with product where it is not defined
|
||||
FIX: Filter on debit/credit
|
||||
FIX: Filter on supplier payment list
|
||||
FIX: fix checkbox displayed according to module project setup parameters - work in progress
|
||||
FIX: inconsistency in margin recording with option "Force to sale price"
|
||||
FIX: invoice PDF generation after payment
|
||||
FIX: mask selector fournisseur if module not activate
|
||||
FIX: merge thirparty also work for bank URL entry
|
||||
FIX: Missing extrafields into export of agenda record
|
||||
FIX: missing parameter in select for POP
|
||||
FIX: missing return edit if update error
|
||||
FIX: missing token on dolGetButtonAction for action delete
|
||||
FIX: payment creation: re-generate invoice PDF with correct display options
|
||||
FIX: payment validation: invoices PDF were no re-generated, make it with correct display options
|
||||
FIX: Periodicity by default on fiscal year, according to the now date, we have plus 1 year added
|
||||
FIX: pgsql: prevent 'WHERE 1'
|
||||
FIX: PHP version requirement in composer.json
|
||||
FIX: project visibility field with two option
|
||||
FIX: saving template email
|
||||
FIX: search accented words in product description (consumption page)
|
||||
FIX: Search on date in accountancy
|
||||
FIX: selection of project for reception must use
|
||||
FIX: shhhhhh ! There is nothing here...
|
||||
FIX: Show input field checkbox selection
|
||||
FIX: Show Ref.Supplier in LinkToObjectBlock
|
||||
FIX: SQL Error show_contacts : socialnetworks
|
||||
FIX: Start hour on ACCOUNTING_DATE_START_BINDING
|
||||
FIX: supplier order: error 500 when using packaging with product where it is not defined
|
||||
FIX: test must be === and not ==
|
||||
FIX: test on link type
|
||||
FIX: type link extrafield case for advanced target emailing
|
||||
FIX: Write right on document
|
||||
>>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.2 compared to 13.0.1 *****
|
||||
|
||||
FIX: 11.0 - $this->socid injected in query without checking for empty value
|
||||
|
||||
@ -157,8 +157,9 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
|
||||
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude = '('.($includecustom?'':'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
|
||||
$dir='';
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"npm": ">=5.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"zapier-platform-core": "10.1.2"
|
||||
"zapier-platform-core": "11.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^5.2.0",
|
||||
|
||||
@ -1 +1,4 @@
|
||||
http://bitboost.com/ref/international-address-formats.html#Formats
|
||||
https://bitboost.com/ref/international-address-formats.html#Formats
|
||||
|
||||
https://www.upu.int/en/Postal-Solutions/Programmes-Services/Addressing-Solutions
|
||||
|
||||
|
||||
@ -1 +1,5 @@
|
||||
http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_CLS_DLD&StrNom=NACE_REV2&StrLanguageCode=FR&StrLayoutCode=#
|
||||
NACE
|
||||
|
||||
https://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_CLS_DLD&StrNom=NACE_REV2&StrLanguageCode=EN&StrLayoutCode=
|
||||
|
||||
https://en.wikipedia.org/wiki/Statistical_Classification_of_Economic_Activities_in_the_European_Community
|
||||
|
||||
@ -3,11 +3,12 @@
|
||||
# The list is updated whenever a change to the official code list in ISO 3166-1 is effected by the ISO 3166/MA.
|
||||
# It lists 240 official short names and code elements. One line of text contains one entry.
|
||||
# A country name and its code element are separated by a semicolon (;).
|
||||
# http://www.iso.org/iso/fr/iso3166_en_code_lists.txt
|
||||
# https://www.iso.org/iso-3166-country-codes.html
|
||||
|
||||
# ISO-3166: http://en.wikipedia.org/wiki/ISO_3166-1
|
||||
# ISO-3166 alpha 2: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
||||
# ISO-3166 alpha 3: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
|
||||
# https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
|
||||
# ISO-3166: https://en.wikipedia.org/wiki/ISO_3166-1
|
||||
# ISO-3166 alpha 2: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
||||
# ISO-3166 alpha 3: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
|
||||
|
||||
AFGHANISTAN;AF
|
||||
ÅLAND ISLANDS;AX
|
||||
@ -254,4 +255,4 @@ WALLIS AND FUTUNA;WF
|
||||
WESTERN SAHARA;EH
|
||||
YEMEN;YE
|
||||
ZAMBIA;ZM
|
||||
ZIMBABWE;ZW
|
||||
ZIMBABWE;ZW
|
||||
|
||||
@ -3,11 +3,12 @@
|
||||
# The list is updated whenever a change to the official code list in ISO 3166-1 is effected by the ISO 3166/MA.
|
||||
# It lists 240 official short names and code elements. One line of text contains one entry.
|
||||
# A country name and its code element are separated by a semicolon (;).
|
||||
# http://www.iso.org/iso/fr/iso3166_fr_code_lists.txt
|
||||
# https://www.iso.org/fr/iso-3166-country-codes.html
|
||||
|
||||
# ISO-3166: http://en.wikipedia.org/wiki/ISO_3166-1
|
||||
# ISO-3166 alpha 2: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
||||
# ISO-3166 alpha 3: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
|
||||
# https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
|
||||
# ISO-3166: https://fr.wikipedia.org/wiki/ISO_3166-1
|
||||
# ISO-3166 alpha 2: https://fr.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
||||
# ISO-3166 alpha 3: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
|
||||
|
||||
AFGHANISTAN;AF
|
||||
AFRIQUE DU SUD;ZA
|
||||
@ -254,4 +255,4 @@ VIET NAM;VN
|
||||
WALLIS ET FUTUNA;WF
|
||||
YÉMEN;YE
|
||||
ZAMBIE;ZM
|
||||
ZIMBABWE;ZW
|
||||
ZIMBABWE;ZW
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
|
||||
For languages:
|
||||
http://demo.icu-project.org/icu-bin/locexp?d_=fr
|
||||
https://icu4c-demos.unicode.org/icu-bin/icudemos - Locale Explorer -> Error 404
|
||||
|
||||
For format number:
|
||||
http://en.wikipedia.org/wiki/Decimal_mark
|
||||
https://en.wikipedia.org/wiki/Decimal_mark
|
||||
|
||||
For date format:
|
||||
http://en.wikipedia.org/wiki/Date_format_by_country
|
||||
https://en.wikipedia.org/wiki/Date_format_by_country
|
||||
|
||||
@ -1 +1,7 @@
|
||||
http://en.wikipedia.org/wiki/VAT_identification_number
|
||||
https://en.wikipedia.org/wiki/VAT_identification_number
|
||||
|
||||
terms
|
||||
(en) VAT = Value Added Tax
|
||||
(fr) TVA = Taxe sur la Valeur Ajouté
|
||||
(es) NIF / CIF
|
||||
(de) USt / MwSt
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
http://www.taxrates.cc/index.html
|
||||
https://en.wikipedia.org/wiki/List_of_countries_by_tax_rates
|
||||
|
||||
For India: VAT=IGST/CGST=Localtax1/SGST=Localtax2: https://cleartax.in/s/what-is-sgst-cgst-igst
|
||||
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
https://en.wikipedia.org/wiki/Single_Euro_Payments_Area
|
||||
https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html
|
||||
https://www.europeanpaymentscouncil.eu/about-sepa
|
||||
|
||||
Spec for credit transfer:
|
||||
https://docs.oracle.com/cd/E39124_01/doc.91/e60210/fields_sepa_pay_file_appx.htm#EOAEL00515
|
||||
|
||||
|
||||
@ -10,6 +10,11 @@ To run phpcs:
|
||||
> cd dolibarrgitrepo
|
||||
> phpcs --standard=dev/setup/codesniffer/ruleset.xml --extensions=php --parallel=8 .
|
||||
|
||||
To fix with phpcbf:
|
||||
> cd dolibarrgitrepo
|
||||
> phpcbf --standard=dev/setup/codesniffer/ruleset.xml --extensions=php --parallel=8 .
|
||||
|
||||
|
||||
Note with Eclipse: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with:
|
||||
* tab value to 4
|
||||
* path of code sniffer standard to dev/codesniffer
|
||||
|
||||
@ -281,7 +281,7 @@ if ($resql) {
|
||||
$journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $obj->code_journal);
|
||||
print '<td class="center">'.$journaltoshow.'</td>';
|
||||
|
||||
if (empty($obj->lettering_code)) {
|
||||
if (empty($obj->lettering_code) && empty($obj->date_validated)) {
|
||||
print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="'.$obj->rowid.'" /></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$obj->piece_num.'">';
|
||||
print img_edit();
|
||||
|
||||
@ -220,7 +220,7 @@ $sql .= " AND f.fk_statut > 0";
|
||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_STANDARD.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
|
||||
}
|
||||
// Add search filter like
|
||||
if ($search_societe) {
|
||||
|
||||
@ -72,12 +72,12 @@ if ($action == 'set_default') {
|
||||
} elseif ($action == 'setdoc') {
|
||||
// Set default model
|
||||
if (dolibarr_set_const($db, "MEMBER_ADDON_PDF_ODT", $value, 'chaine', 0, '', $conf->entity)) {
|
||||
// La constante qui a ete lue en avant du nouveau set
|
||||
// on passe donc par une variable pour avoir un affichage coherent
|
||||
// The constant that was read ahead of the new set
|
||||
// we therefore go through a variable to have a consistent display
|
||||
$conf->global->MEMBER_ADDON_PDF_ODT = $value;
|
||||
}
|
||||
|
||||
// On active le modele
|
||||
// We activate the model
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0) {
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
@ -317,7 +317,7 @@ $helptext .= '__YEAR__, __MONTH__, __DAY__';
|
||||
form_constantes($constantes, 0, $helptext);
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
// Defini tableau def des modeles
|
||||
// Defined model definition table
|
||||
$def = array();
|
||||
$sql = "SELECT nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
|
||||
@ -39,6 +39,8 @@ if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -57,7 +59,8 @@ if ($action == 'update') {
|
||||
$amount = GETPOST('MEMBER_NEWFORM_AMOUNT');
|
||||
$editamount = GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||
$payonline = GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||
$forcetype = GETPOST('MEMBER_NEWFORM_FORCETYPE');
|
||||
$forcetype = GETPOST('MEMBER_NEWFORM_FORCETYPE', 'int');
|
||||
$forcemorphy = GETPOST('MEMBER_NEWFORM_FORCEMORPHY', 'aZ09');
|
||||
|
||||
$res = dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC", $public, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT", $amount, 'chaine', 0, '', $conf->entity);
|
||||
@ -68,6 +71,11 @@ if ($action == 'update') {
|
||||
} else {
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE", $forcetype, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if ($forcemorphy == '-1') {
|
||||
$res = dolibarr_del_const($db, "MEMBER_NEWFORM_FORCEMORPHY", $conf->entity);
|
||||
} else {
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_FORCEMORPHY", $forcemorphy, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
@ -182,6 +190,16 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
||||
print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listofval) > 1 ? 1 : 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Force nature of member (mor/phy)
|
||||
$morphys["phy"] = $langs->trans("Physical");
|
||||
$morphys["mor"] = $langs->trans("Moral");
|
||||
print '<tr class="oddeven drag" id="trforcenature"><td>';
|
||||
print $langs->trans("ForceMemberNature");
|
||||
print '</td><td class="right">';
|
||||
$forcenature = empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY) ? 0 : $conf->global->MEMBER_NEWFORM_FORCEMORPHY;
|
||||
print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Amount
|
||||
print '<tr class="oddeven" id="tramount"><td>';
|
||||
print $langs->trans("DefaultAmount");
|
||||
|
||||
@ -1891,7 +1891,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
}*/
|
||||
|
||||
// Modify
|
||||
if (!$user->rights->adherent->creer) {
|
||||
if (!empty($user->rights->adherent->creer)) {
|
||||
print '<a class="butAction" href="card.php?rowid='.$id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
|
||||
} else {
|
||||
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</span>'."\n";
|
||||
|
||||
@ -366,7 +366,7 @@ class AdherentType extends CommonObject
|
||||
$sql .= "libelle = '".$this->db->escape($this->label)."',";
|
||||
$sql .= "morphy = '".$this->db->escape($this->morphy)."',";
|
||||
$sql .= "subscription = '".$this->db->escape($this->subscription)."',";
|
||||
$sql .= "amount = '".$this->db->escape($this->amount)."',";
|
||||
$sql .= "amount = ".((empty($this->amount) && $this->amount == '') ? 'null' : ((float) $this->amount)).",";
|
||||
$sql .= "duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."',";
|
||||
$sql .= "note = '".$this->db->escape($this->note)."',";
|
||||
$sql .= "vote = ".(integer) $this->db->escape($this->vote).",";
|
||||
|
||||
@ -198,8 +198,8 @@ foreach ($data as $val) {
|
||||
//print '</a>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
||||
print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
||||
print '<td class="right"><span class="amount">'.price(price2num($val['total'], 'MT'), 1).'</span></td>';
|
||||
print '<td class="right"><span class="amount">'.price(price2num($val['avg'], 'MT'), 1).'</span></td>';
|
||||
print '</tr>';
|
||||
$oldyear = $year;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ $label = GETPOST("label", "alpha");
|
||||
$morphy = GETPOST("morphy", "alpha");
|
||||
$status = GETPOST("status", "int");
|
||||
$subscription = GETPOST("subscription", "int");
|
||||
$amount = price2num(GETPOST('amount', 'alpha'), 'MT');
|
||||
$amount = GETPOST('amount', 'alpha');
|
||||
$duration_value = GETPOST('duration_value', 'int');
|
||||
$duration_unit = GETPOST('duration_unit', 'alpha');
|
||||
$vote = GETPOST("vote", "int");
|
||||
@ -119,7 +119,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) {
|
||||
$object->morphy = trim($morphy);
|
||||
$object->status = (int) $status;
|
||||
$object->subscription = (int) $subscription;
|
||||
$object->amount = $amount;
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->note = trim($comment);
|
||||
@ -166,12 +166,11 @@ if ($action == 'update' && $user->rights->adherent->configurer) {
|
||||
$object->fetch($rowid);
|
||||
|
||||
$object->oldcopy = clone $object;
|
||||
|
||||
$object->label= trim($label);
|
||||
$object->morphy = trim($morphy);
|
||||
$object->status = (int) $status;
|
||||
$object->subscription = (int) $subscription;
|
||||
$object->amount = $amount;
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));;
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->note = trim($comment);
|
||||
@ -306,7 +305,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">'.yn($objp->subscription).'</td>';
|
||||
print '<td class="center">'.price($objp->amount).'</td>';
|
||||
print '<td class="center"><span class="amount">'.(is_null($objp->amount) || $objp->amount === '' ? '' : price($objp->amount)).'</span></td>';
|
||||
print '<td class="center">'.yn($objp->vote).'</td>';
|
||||
print '<td class="center">'.$membertype->getLibStatut(5).'</td>';
|
||||
if ($user->rights->adherent->configurer) {
|
||||
@ -446,7 +445,7 @@ if ($rowid > 0) {
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Amount").'</td><td>';
|
||||
print price($object->amount);
|
||||
print ((is_null($object->amount) || $object->amount === '') ? '' : price($object->amount));
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
@ -594,24 +593,24 @@ if ($rowid > 0) {
|
||||
$titre .= " (".$membertype->label.")";
|
||||
}
|
||||
|
||||
$param = "&rowid=".$object->id;
|
||||
$param = "&rowid=".urlencode($object->id);
|
||||
if (!empty($status)) {
|
||||
$param .= "&status=".$status;
|
||||
$param .= "&status=".urlencode($status);
|
||||
}
|
||||
if (!empty($search_lastname)) {
|
||||
$param .= "&search_lastname=".$search_lastname;
|
||||
$param .= "&search_lastname=".urlencode($search_lastname);
|
||||
}
|
||||
if (!empty($search_firstname)) {
|
||||
$param .= "&search_firstname=".$search_firstname;
|
||||
$param .= "&search_firstname=".urlencode($search_firstname);
|
||||
}
|
||||
if (!empty($search_login)) {
|
||||
$param .= "&search_login=".$search_login;
|
||||
$param .= "&search_login=".urlencode($search_login);
|
||||
}
|
||||
if (!empty($search_email)) {
|
||||
$param .= "&search_email=".$search_email;
|
||||
$param .= "&search_email=".urlencode($search_email);
|
||||
}
|
||||
if (!empty($filter)) {
|
||||
$param .= "&filter=".$filter;
|
||||
$param .= "&filter=".urlencode($filter);
|
||||
}
|
||||
|
||||
if ($sall) {
|
||||
@ -797,7 +796,9 @@ if ($rowid > 0) {
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td>';
|
||||
print '<input name="amount" size="5" value="'.price($object->amount).'">';
|
||||
print '<input name="amount" size="5" value="';
|
||||
print ((is_null($object->amount) || $object->amount === '') ? '' : price($object->amount));
|
||||
print '">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
|
||||
@ -84,7 +84,7 @@ print "<br>\n";
|
||||
|
||||
$head = reception_admin_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'attributeslines_reception', $langs->trans("Receptions"), -1, 'sending');
|
||||
print dol_get_fiche_head($head, 'attributeslines_reception', $langs->trans("Receptions"), -1, 'reception');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -100,6 +100,7 @@ if ($conf->use_javascript_ajax) {
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
/*
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
|
||||
@ -108,6 +109,7 @@ if ($conf->use_javascript_ajax) {
|
||||
print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
|
||||
}
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
@ -84,7 +84,7 @@ print "<br>\n";
|
||||
|
||||
$head = reception_admin_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'attributes_reception', $langs->trans("Receptions"), -1, 'sending');
|
||||
print dol_get_fiche_head($head, 'attributes_reception', $langs->trans("Receptions"), -1, 'reception');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -172,7 +172,7 @@ print load_fiche_titre($langs->trans("ReceptionsSetup"), $linkback, 'title_setup
|
||||
print '<br>';
|
||||
$head = reception_admin_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'reception', $langs->trans("Receptions"), -1, 'sending');
|
||||
print dol_get_fiche_head($head, 'reception', $langs->trans("Receptions"), -1, 'reception');
|
||||
|
||||
// Reception numbering model
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ if ($action == 'updateform') {
|
||||
} elseif ($action == 'delete') {
|
||||
// Delete file
|
||||
$langs->load("other");
|
||||
$file = $conf->admin->dir_temp.'/'.GETPOST('urlfile', 'alpha'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
$file = $conf->admin->dir_temp.'/'.GETPOST('urlfile', 'alpha');
|
||||
$ret = dol_delete_file($file);
|
||||
if ($ret) {
|
||||
setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile', 'alpha')), null, 'mesgs');
|
||||
|
||||
@ -226,9 +226,9 @@ if (!$error && $xml) {
|
||||
//var_dump($xml->dolibarr_htdocs_dir[0]['includecustom']);exit;
|
||||
$includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']);
|
||||
|
||||
// Defined qualified files (must be same than into generate_filelist_xml.php)
|
||||
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
|
||||
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
||||
|
||||
// Fill file_list with files in signature, new files, modified files
|
||||
|
||||
@ -40,6 +40,8 @@ if (GETPOST('action', 'aZ09') == 'donothing') {
|
||||
exit;
|
||||
}
|
||||
|
||||
$execmethod = empty($conf->global->MAIN_EXEC_USE_POPEN) ? 1 : $conf->global->MAIN_EXEC_USE_POPEN;
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -74,7 +76,13 @@ print "<strong>PHP allow_url_include</strong> = ".(ini_get('allow_url_include')
|
||||
print "<strong>PHP disable_functions</strong> = ";
|
||||
$arrayoffunctionsdisabled = explode(',', ini_get('disable_functions'));
|
||||
$arrayoffunctionstodisable = explode(',', 'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals');
|
||||
$arrayoffunctionstodisable2 = explode(',', 'exec,passthru,shell_exec,system,proc_open,popen');
|
||||
if ($execmethod == 1) {
|
||||
$arrayoffunctionstodisable2 = explode(',', 'passthru,shell_exec,system,proc_open,popen');
|
||||
$functiontokeep = 'exec';
|
||||
} else {
|
||||
$arrayoffunctionstodisable2 = explode(',', 'exec,passthru,shell_exec,system,proc_open');
|
||||
$functiontokeep = 'popen';
|
||||
}
|
||||
$i = 0;
|
||||
foreach ($arrayoffunctionsdisabled as $functionkey) {
|
||||
if ($i > 0) {
|
||||
@ -115,6 +123,13 @@ if ($todisabletext) {
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
print $langs->trans("PHPFunctionsRequiredForCLI").': ';
|
||||
if (in_array($functiontokeep, $arrayoffunctionsdisabled)) {
|
||||
print img_picto($langs->trans("PHPFunctionsRequiredForCLI"), 'warning');
|
||||
}
|
||||
print '<span class="opacitymedium">'.$functiontokeep.'</span>';
|
||||
print '<br>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// XDebug
|
||||
@ -245,6 +260,22 @@ print '<strong>MAIN_SECURITY_ANTI_SSRF_SERVER_IP</strong> = '.(empty($conf->glob
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<strong>MAIN_EXEC_USE_POPEN</strong> = ';
|
||||
if (empty($conf->global->MAIN_EXEC_USE_POPEN)) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Undefined").'</span> ';
|
||||
} else {
|
||||
print $conf->global->MAIN_EXEC_USE_POPEN.' ';
|
||||
}
|
||||
if ($execmethod == 1) {
|
||||
print ' --> "exec" PHP method will be used for shell commands.';
|
||||
}
|
||||
if ($execmethod == 2) {
|
||||
print ' --> "popen" PHP method will be used for shell commands.';
|
||||
}
|
||||
print "<br>";
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<strong>'.$langs->trans("AntivirusEnabledOnUpload").'</strong>: ';
|
||||
print empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? '' : img_picto('', 'tick').' ';
|
||||
print yn($conf->global->MAIN_ANTIVIRUS_COMMAND ? 1 : 0);
|
||||
|
||||
@ -124,6 +124,16 @@ class DolibarrApi
|
||||
unset($object->ref_previous);
|
||||
unset($object->ref_next);
|
||||
unset($object->ref_int);
|
||||
unset($object->imgWidth);
|
||||
unset($object->imgHeight);
|
||||
unset($object->barcode_type_code);
|
||||
unset($object->barcode_type_label);
|
||||
|
||||
unset($object->mode_reglement); // We use mode_reglement_id now
|
||||
unset($object->cond_reglement); // We use cond_reglement_id now
|
||||
unset($object->note); // We use note_public or note_private now
|
||||
unset($object->contact); // We use contact_id now
|
||||
unset($object->thirdparty); // We use thirdparty_id or fk_soc or socid now
|
||||
|
||||
unset($object->projet); // Should be fk_project
|
||||
unset($object->project); // Should be fk_project
|
||||
@ -137,6 +147,12 @@ class DolibarrApi
|
||||
unset($object->timespent_fk_user);
|
||||
unset($object->timespent_note);
|
||||
unset($object->fk_delivery_address);
|
||||
unset($object->modelpdf);
|
||||
unset($object->sendtoid);
|
||||
unset($object->name_bis);
|
||||
unset($object->newref);
|
||||
unset($object->alreadypaid);
|
||||
unset($object->openid);
|
||||
|
||||
unset($object->statuts);
|
||||
unset($object->statuts_short);
|
||||
@ -169,16 +185,17 @@ class DolibarrApi
|
||||
|
||||
unset($object->region);
|
||||
unset($object->region_code);
|
||||
unset($object->country);
|
||||
unset($object->state);
|
||||
unset($object->state_code);
|
||||
unset($object->departement);
|
||||
unset($object->departement_code);
|
||||
|
||||
unset($object->libelle_statut);
|
||||
unset($object->libelle_paiement);
|
||||
|
||||
unset($object->prefix_comm);
|
||||
|
||||
unset($object->sendtoid);
|
||||
unset($object->name_bis);
|
||||
unset($object->newref);
|
||||
|
||||
if (!isset($object->table_element) || $object->table_element != 'ticket') {
|
||||
unset($object->comments);
|
||||
}
|
||||
|
||||
@ -1744,9 +1744,9 @@ class Setup extends DolibarrApi
|
||||
if (is_object($xml->dolibarr_htdocs_dir[0])) {
|
||||
$includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']);
|
||||
|
||||
// Defined qualified files (must be same than into generate_filelist_xml.php)
|
||||
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
|
||||
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
||||
|
||||
// Fill file_list with files in signature, new files, modified files
|
||||
|
||||
@ -754,6 +754,7 @@ if ($type == Categorie::TYPE_CONTACT) {
|
||||
$num = count($contacts);
|
||||
$nbtotalofrecords = '';
|
||||
$newcardbutton = '';
|
||||
$objsoc = new Societe($db);
|
||||
print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contact', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print '<table class="noborder centpercent">'."\n";
|
||||
@ -770,6 +771,11 @@ if ($type == Categorie::TYPE_CONTACT) {
|
||||
print "\t".'<tr class="oddeven">'."\n";
|
||||
print '<td class="nowrap" valign="top">';
|
||||
print $contact->getNomUrl(1, 'category');
|
||||
if ($contact->socid > 0) {
|
||||
$objsoc->fetch($contact->socid);
|
||||
print ' - ';
|
||||
print $objsoc->getNomUrl(1, 'contact');
|
||||
}
|
||||
print "</td>\n";
|
||||
// Link to delete from category
|
||||
print '<td class="right">';
|
||||
|
||||
@ -298,9 +298,9 @@ $userstatic = new User($db);
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
$title = $langs->trans("CustomerCard");
|
||||
$title = $langs->trans("ThirdParty")." - ".$langs->trans('Customer');
|
||||
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
|
||||
$title = $object->name;
|
||||
$title = $object->name." - ".$langs->trans('Customer');
|
||||
}
|
||||
|
||||
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas|DE:Modul_Geschäftspartner';
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2019 Laurent Destailleur <eldy@uers.sourceforge.net>
|
||||
* Copyright (C) 2005-2016 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
||||
*
|
||||
* 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
|
||||
@ -210,6 +211,7 @@ if (empty($reshook)) {
|
||||
$substitutionarray['__USER_SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter)
|
||||
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.urlencode($obj->tag).'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'&email='.urlencode($obj->email).'&mtid='.$obj->rowid.'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
||||
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.urlencode($obj->tag).'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'&email='.urlencode($obj->email).'&mtid='.$obj->rowid.'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>';
|
||||
$substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.urlencode($obj->tag).'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'&email='.urlencode($obj->email).'&mtid='.$obj->rowid;
|
||||
|
||||
$onlinepaymentenabled = 0;
|
||||
if (!empty($conf->paypal->enabled)) {
|
||||
@ -244,6 +246,9 @@ if (empty($reshook)) {
|
||||
$substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'contractline'.$obj->source_id, 2);
|
||||
}
|
||||
}
|
||||
if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
||||
$substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = '<a target="_blank" href="'.DOL_MAIN_URL_ROOT.'/public/members/new.php'.((!empty($conf->multicompany->enabled)) ? '?entity='.$conf->entity : '').'">'.$langs->trans('BlankSubscriptionForm'). '</a>';
|
||||
}
|
||||
/* For backward compatibility, deprecated */
|
||||
if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) {
|
||||
$substitutionarray['__SECUREKEYPAYPAL__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);
|
||||
@ -325,7 +330,7 @@ if (empty($reshook)) {
|
||||
//if cheack read is use then update prospect contact status
|
||||
if (strpos($message, '__CHECK_READ__') !== false) {
|
||||
//Update status communication of thirdparty prospect
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".$obj->rowid.")";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".((int) $obj->rowid).")";
|
||||
dol_syslog("card.php: set prospect thirdparty status", LOG_DEBUG);
|
||||
$resql2 = $db->query($sql);
|
||||
if (!$resql2) {
|
||||
@ -333,7 +338,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
//Update status communication of contact prospect
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.rowid=".$obj->rowid." AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.rowid=".((int) $obj->rowid)." AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)";
|
||||
dol_syslog("card.php: set prospect contact status", LOG_DEBUG);
|
||||
|
||||
$resql2 = $db->query($sql);
|
||||
|
||||
@ -347,7 +347,7 @@ if (empty($reshook)) {
|
||||
$duration = GETPOST('duree_validite', 'int');
|
||||
|
||||
if (empty($datep)) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePropal")), null, 'errors');
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
@ -1445,8 +1445,9 @@ if (!empty($conf->projet->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
$title = $langs->trans('Proposal')." - ".$langs->trans('Card');
|
||||
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos|DE:Modul_Angebote';
|
||||
llxHeader('', $langs->trans('Proposal'), $help_url);
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
@ -1621,7 +1622,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('DatePropal').'</td><td>';
|
||||
print $form->selectDate('', '', '', '', '', "addprop", 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -2062,7 +2063,7 @@ if ($action == 'create') {
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Date');
|
||||
print $langs->trans('DatePropal');
|
||||
print '</td>';
|
||||
if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||
|
||||
@ -118,8 +118,9 @@ elseif ($action == 'setaddress' && $user->rights->propale->creer)
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
||||
$title = $langs->trans('Proposal')." - ".$langs->trans('ContactsAddresses');
|
||||
$help_url = "EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos";
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
@ -37,7 +37,7 @@ if (!empty($conf->projet->enabled)) {
|
||||
}
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('compta', 'other', 'companies'));
|
||||
$langs->loadLangs(array('propal', 'compta', 'other', 'companies'));
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
@ -102,8 +102,9 @@ if ($object->id > 0) {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
||||
$title = $langs->trans('Proposal')." - ".$langs->trans('Documents');
|
||||
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
@ -59,7 +59,9 @@ restrictedArea($user, 'propal', $object->id);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
||||
$title = $langs->trans('Proposal')." - ".$langs->trans('Info');
|
||||
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016-2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2017-2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
@ -182,7 +182,7 @@ $arrayfields = array(
|
||||
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
|
||||
'p.date'=>array('label'=>"Date", 'checked'=>1),
|
||||
'p.date'=>array('label'=>"DatePropal", 'checked'=>1),
|
||||
'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1),
|
||||
'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0),
|
||||
'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0),
|
||||
@ -711,24 +711,12 @@ if ($resql) {
|
||||
if ($sall) {
|
||||
$param .= '&sall='.urlencode($sall);
|
||||
}
|
||||
if ($search_date_start) {
|
||||
$param .= '&search_date_start='.urlencode($search_date_start);
|
||||
}
|
||||
if ($search_date_end) {
|
||||
$param .= '&search_date_end='.urlencode($search_date_end);
|
||||
}
|
||||
if ($search_dateend_start) {
|
||||
$param .= '&search_dateend_start='.urlencode($search_dateend_start);
|
||||
}
|
||||
if ($search_dateend_end) {
|
||||
$param .= '&search_dateend_end='.urlencode($search_dateend_end);
|
||||
}
|
||||
if ($search_datedelivery_start) {
|
||||
$param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start);
|
||||
}
|
||||
if ($search_datedelivery_end) {
|
||||
$param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end);
|
||||
}
|
||||
if ($search_date_start) $param .= '&search_date_startday='.urlencode(dol_print_date($search_date_start, '%d')).'&search_date_startmonth='.urlencode(dol_print_date($search_date_start, '%m')).'&search_date_startyear='.urlencode(dol_print_date($search_date_start, '%Y'));
|
||||
if ($search_date_end) $param .= '&search_date_endday='.urlencode(dol_print_date($search_date_end, '%d')).'&search_date_endmonth='.urlencode(dol_print_date($search_date_end, '%m')).'&search_date_endyear='.urlencode(dol_print_date($search_date_end, '%Y'));
|
||||
if ($search_dateend_start) $param .= '&search_dateend_startday='.urlencode(dol_print_date($search_dateend_start, '%d')).'&search_dateend_startmonth='.urlencode(dol_print_date($search_dateend_start, '%m')).'&search_dateend_startyear='.urlencode(dol_print_date($search_dateend_start, '%Y'));
|
||||
if ($search_dateend_end) $param .= '&search_dateend_endday='.urlencode(dol_print_date($search_dateend_end, '%d')).'&search_dateend_endmonth='.urlencode(dol_print_date($search_dateend_end, '%m')).'&search_dateend_endyear='.urlencode(dol_print_date($search_dateend_end, '%Y'));
|
||||
if ($search_datedelivery_start) $param .= '&search_datedelivery_startday='.urlencode(dol_print_date($search_datedelivery_start, '%d')).'&search_datedelivery_startmonth='.urlencode(dol_print_date($search_datedelivery_start, '%m')).'&search_datedelivery_startyear='.urlencode(dol_print_date($search_datedelivery_start, '%Y'));
|
||||
if ($search_datedelivery_end) $param .= '&search_datedelivery_endday='.urlencode(dol_print_date($search_datedelivery_end, '%d')).'&search_datedelivery_endmonth='.urlencode(dol_print_date($search_datedelivery_end, '%m')).'&search_datedelivery_endyear='.urlencode(dol_print_date($search_datedelivery_end, '%Y'));
|
||||
if ($search_ref) {
|
||||
$param .= '&search_ref='.urlencode($search_ref);
|
||||
}
|
||||
@ -787,37 +775,37 @@ if ($resql) {
|
||||
$param .= '&search_categ_cus='.urlencode($search_categ_cus);
|
||||
}
|
||||
if ($search_product_category != '') {
|
||||
$param .= '&search_product_category='.$search_product_category;
|
||||
$param .= '&search_product_category='.urlencode($search_product_category);
|
||||
}
|
||||
if ($search_fk_cond_reglement > 0) {
|
||||
$param .= '&search_fk_cond_reglement='.$search_fk_cond_reglement;
|
||||
$param .= '&search_fk_cond_reglement='.urlencode($search_fk_cond_reglement);
|
||||
}
|
||||
if ($search_fk_shipping_method > 0) {
|
||||
$param .= '&search_fk_shipping_method='.$search_fk_shipping_method;
|
||||
$param .= '&search_fk_shipping_method='.urlencode($search_fk_shipping_method);
|
||||
}
|
||||
if ($search_fk_input_reason > 0) {
|
||||
$param .= '&search_fk_input_reason='.$search_fk_input_reason;
|
||||
$param .= '&search_fk_input_reason='.urlencode($search_fk_input_reason);
|
||||
}
|
||||
if ($search_fk_mode_reglement > 0) {
|
||||
$param .= '&search_fk_mode_reglement='.$search_fk_mode_reglement;
|
||||
$param .= '&search_fk_mode_reglement='.urlencode($search_fk_mode_reglement);
|
||||
}
|
||||
if ($search_type_thirdparty > 0) {
|
||||
$param .= '&search_type_thirdparty='.$search_type_thirdparty;
|
||||
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
|
||||
}
|
||||
if ($search_town) {
|
||||
$param .= '&search_town='.$search_town;
|
||||
$param .= '&search_town='.urlencode($search_town);
|
||||
}
|
||||
if ($search_zip) {
|
||||
$param .= '&search_zip='.$search_zip;
|
||||
$param .= '&search_zip='.urlencode($search_zip);
|
||||
}
|
||||
if ($search_state) {
|
||||
$param .= '&search_state='.$search_state;
|
||||
$param .= '&search_state='.urlencode($search_state);
|
||||
}
|
||||
if ($search_town) {
|
||||
$param .= '&search_town='.$search_town;
|
||||
$param .= '&search_town='.urlencode($search_town);
|
||||
}
|
||||
if ($search_country) {
|
||||
$param .= '&search_country='.$search_country;
|
||||
$param .= '&search_country='.urlencode($search_country);
|
||||
}
|
||||
|
||||
// Add $param from extra fields
|
||||
@ -825,23 +813,22 @@ if ($resql) {
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>img_picto('', 'pdf').' '.$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>img_picto('', 'pdf').' '.$langs->trans("PDFMerge"),
|
||||
|
||||
'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($permissiontosendbymail) {
|
||||
$arrayofmassactions['presend']=img_picto('', 'email').' '.$langs->trans("SendByMail");
|
||||
$arrayofmassactions['presend']=img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail");
|
||||
}
|
||||
if ($permissiontovalidate) {
|
||||
$arrayofmassactions['prevalidate']=img_picto('', 'check').' '.$langs->trans("Validate");
|
||||
$arrayofmassactions['prevalidate']=img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate");
|
||||
}
|
||||
if ($permissiontoclose) {
|
||||
$arrayofmassactions['presign']=img_picto('', 'propal').' '.$langs->trans("Sign");
|
||||
$arrayofmassactions['nopresign']=img_picto('', 'propal').' '.$langs->trans("NoSign");
|
||||
$arrayofmassactions['setbilled'] =img_picto('', 'bill').' '.$langs->trans("ClassifyBilled");
|
||||
$arrayofmassactions['presign']=img_picto('', 'propal', 'class="pictofixedwidth"').$langs->trans("Sign");
|
||||
$arrayofmassactions['nopresign']=img_picto('', 'propal', 'class="pictofixedwidth"').$langs->trans("NoSign");
|
||||
$arrayofmassactions['setbilled'] =img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("ClassifyBilled");
|
||||
}
|
||||
if ($permissiontodelete) {
|
||||
$arrayofmassactions['predelete'] = img_picto('', 'delete').' '.$langs->trans("Delete");
|
||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||
}
|
||||
|
||||
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
|
||||
@ -929,7 +916,7 @@ if ($resql) {
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle);
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) {
|
||||
if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
$formproduct = new FormProduct($db);
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
|
||||
@ -71,9 +71,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans('Proposal')." - ".$langs->trans('Notes');
|
||||
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
|
||||
|
||||
llxHeader('', $langs->trans('Proposal'), $help_url);
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if ($object->id > 0) {
|
||||
if ($object->fetch_thirdparty() > 0) {
|
||||
|
||||
@ -167,10 +167,10 @@ if ($socid > 0) {
|
||||
// Discount type
|
||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td><td>';
|
||||
if ($isCustomer) {
|
||||
print '<input type="radio" name="discount_type" id="discount_type_0" checked value="0"/> <label for="discount_type_0">'.$langs->trans('Customer').'</label>';
|
||||
print '<input type="radio" name="discount_type" id="discount_type_0" '.(GETPOSTISSET('discount_type') ? (GETPOST('discount_type', 'int') == 0 ? ' checked' : '') : ' checked').' value="0"> <label for="discount_type_0">'.$langs->trans('Customer').'</label>';
|
||||
}
|
||||
if ($isSupplier) {
|
||||
print ' <input type="radio" name="discount_type" id="discount_type_1"'.($isCustomer ? '' : ' checked').' value="1"/> <label for="discount_type_1">'.$langs->trans('Supplier').'</label>';
|
||||
print ' <input type="radio" name="discount_type" id="discount_type_1"'.(GETPOSTISSET('discount_type') ? (GETPOST('discount_type', 'int') ? ' checked' : '') : ($isCustomer ? '' : ' checked')).' value="1"> <label for="discount_type_1">'.$langs->trans('Supplier').'</label>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -1392,8 +1392,9 @@ if (empty($reshook)) {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge');
|
||||
$title = $langs->trans('Order')." - ".$langs->trans('Card');
|
||||
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
|
||||
@ -344,8 +344,8 @@ class Commande extends CommonOrder
|
||||
'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>270),
|
||||
'module_source' =>array('type'=>'varchar(32)', 'label'=>'POSModule', 'enabled'=>1, 'visible'=>-1, 'position'=>275),
|
||||
'pos_source' =>array('type'=>'varchar(32)', 'label'=>'POSTerminal', 'enabled'=>1, 'visible'=>-1, 'position'=>280),
|
||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>400),
|
||||
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500),
|
||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900),
|
||||
);
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
||||
@ -103,8 +103,9 @@ elseif ($action == 'setaddress' && $user->rights->commande->creer)
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
||||
$title = $langs->trans('Order')." - ".$langs->trans('ContactsAddresses');
|
||||
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
@ -37,7 +37,7 @@ if (!empty($conf->projet->enabled)) {
|
||||
}
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('companies', 'other', 'bills'));
|
||||
$langs->loadLangs(array('companies', 'other', 'bills', 'orders'));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm');
|
||||
@ -94,8 +94,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
||||
$title = $langs->trans('Order')." - ".$langs->trans('Documents');
|
||||
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
@ -62,7 +62,9 @@ if (!$object->fetch($id, $ref) > 0) {
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
||||
$title = $langs->trans('Order')." - ".$langs->trans('Info');
|
||||
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
$object->info($object->id);
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
* Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016-2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2021 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
*
|
||||
@ -163,21 +163,21 @@ $checkedtypetiers = 0;
|
||||
$arrayfields = array(
|
||||
'c.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5),
|
||||
'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>-1, 'position'=>10),
|
||||
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>20),
|
||||
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>20),
|
||||
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>25),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30),
|
||||
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>31),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>1, 'position'=>35),
|
||||
's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>40),
|
||||
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1, 'position'=>31),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>35),
|
||||
's.zip'=>array('label'=>"Zip", 'checked'=>-1, 'position'=>40),
|
||||
'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45),
|
||||
'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>50),
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55),
|
||||
'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60),
|
||||
'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65),
|
||||
'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>0, 'position'=>66 , 'enabled'=>!empty($conf->expedition->enabled)),
|
||||
'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>0, 'position'=>67),
|
||||
'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0, 'position'=>68),
|
||||
'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>0, 'position'=>69),
|
||||
'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>!empty($conf->expedition->enabled)),
|
||||
'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67),
|
||||
'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68),
|
||||
'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69),
|
||||
'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75),
|
||||
'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80),
|
||||
'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85),
|
||||
@ -186,15 +186,15 @@ $arrayfields = array(
|
||||
'c.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>100),
|
||||
'c.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>105),
|
||||
'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>110),
|
||||
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10, 'position'=>115),
|
||||
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500, 'position'=>120),
|
||||
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500, 'position'=>125),
|
||||
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500, 'position'=>130),
|
||||
'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135),
|
||||
'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140),
|
||||
'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'position'=>990, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>145),
|
||||
'shippable'=>array('label'=>"Shippable", 'checked'=>1, 'position'=>995, 'enabled'=>(!empty($conf->expedition->enabled)), 'position'=>150),
|
||||
'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000, 'position'=>155)
|
||||
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115),
|
||||
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120),
|
||||
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125),
|
||||
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
|
||||
'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135),
|
||||
'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140),
|
||||
'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(!empty($conf->expedition->enabled)), 'position'=>990),
|
||||
'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>995),
|
||||
'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000)
|
||||
);
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
@ -706,10 +706,10 @@ if ($resql) {
|
||||
$param .= '&search_status='.urlencode($search_status);
|
||||
}
|
||||
if ($search_datecloture_start) {
|
||||
$param .= '&search_datecloture_start='.urlencode($search_datecloture_start);
|
||||
$param .= '&search_datecloture_startday='.dol_print_date($search_datecloture_start, '%d').'&search_datecloture_startmonth='.dol_print_date($search_datecloture_start, '%m').'&search_datecloture_startyear='.dol_print_date($search_datecloture_start, '%Y');
|
||||
}
|
||||
if ($search_datecloture_end) {
|
||||
$param .= '&search_datecloture_end='.urlencode($search_datecloture_end);
|
||||
$param .= '&search_datecloture_endday='.dol_print_date($search_datecloture_end, '%d').'&search_datecloture_endmonth='.dol_print_date($search_datecloture_end, '%m').'&search_datecloture_endyear='.dol_print_date($search_datecloture_end, '%Y');
|
||||
}
|
||||
if ($search_dateorder_start) {
|
||||
$param .= '&search_dateorder_start_day='.dol_print_date($search_dateorder_start, '%d').'&search_dateorder_start_month='.dol_print_date($search_dateorder_start, '%m').'&search_dateorder_start_year='.dol_print_date($search_dateorder_start, '%Y');
|
||||
@ -805,16 +805,16 @@ if ($resql) {
|
||||
$param .= '&search_billed='.urlencode($search_billed);
|
||||
}
|
||||
if ($search_fk_cond_reglement > 0) {
|
||||
$param .= '&search_fk_cond_reglement='.$search_fk_cond_reglement;
|
||||
$param .= '&search_fk_cond_reglement='.urlencode($search_fk_cond_reglement);
|
||||
}
|
||||
if ($search_fk_shipping_method > 0) {
|
||||
$param .= '&search_fk_shipping_method='.$search_fk_shipping_method;
|
||||
$param .= '&search_fk_shipping_method='.urlencode($search_fk_shipping_method);
|
||||
}
|
||||
if ($search_fk_mode_reglement > 0) {
|
||||
$param .= '&search_fk_mode_reglement='.$search_fk_mode_reglement;
|
||||
$param .= '&search_fk_mode_reglement='.urlencode($search_fk_mode_reglement);
|
||||
}
|
||||
if ($search_fk_input_reason > 0) {
|
||||
$param .= '&search_fk_input_reason='.$search_fk_input_reason;
|
||||
$param .= '&search_fk_input_reason='.urlencode($search_fk_input_reason);
|
||||
}
|
||||
|
||||
// Add $param from extra fields
|
||||
@ -887,7 +887,6 @@ if ($resql) {
|
||||
}
|
||||
|
||||
if ($massaction == 'createbills') {
|
||||
//var_dump($_REQUEST);
|
||||
print '<input type="hidden" name="massaction" value="confirm_createbills">';
|
||||
|
||||
print '<table class="noborder" width="100%" >';
|
||||
@ -975,7 +974,7 @@ if ($resql) {
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle);
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
||||
if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
$formproduct = new FormProduct($db);
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
@ -1115,7 +1114,7 @@ if ($resql) {
|
||||
// Channel
|
||||
if (!empty($arrayfields['c.fk_input_reason']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
$form->selectInputReason($search_fk_input_reason, 'search_fk_input_reason', '', 1);
|
||||
$form->selectInputReason($search_fk_input_reason, 'search_fk_input_reason', '', 1, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['c.total_ht']['checked'])) {
|
||||
@ -1838,6 +1837,9 @@ if ($resql) {
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
// Billed
|
||||
|
||||
@ -67,8 +67,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
||||
$title = $langs->trans('Order')." - ".$langs->trans('Notes');
|
||||
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
@ -829,7 +829,7 @@ if ($action == 'create') {
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post" name="formsoc">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="id" value="'.$_REQUEST["id"].'">'."\n\n";
|
||||
print '<input type="hidden" name="id" value="'.GETPOST("id", 'int').'">'."\n\n";
|
||||
|
||||
print dol_get_fiche_head(array(), 0, '', 0);
|
||||
|
||||
|
||||
@ -503,6 +503,7 @@ print "</tr>\n";
|
||||
|
||||
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
$found = 0;
|
||||
$i = 0;
|
||||
$lastcurrencycode = '';
|
||||
|
||||
@ -338,14 +338,13 @@ if ($result) {
|
||||
if ($search_accountancy_subledger > 0) {
|
||||
$param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger);
|
||||
}
|
||||
|
||||
if ($optioncss != '') {
|
||||
$param .= '&optioncss='.urlencode($optioncss);
|
||||
$param .= '&optioncss='.urlencode($optioncss);
|
||||
}
|
||||
|
||||
$url = DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create';
|
||||
if (!empty($socid)) {
|
||||
$url .= '&socid='.$socid;
|
||||
$url .= '&socid='.urlencode($socid);
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->modifier);
|
||||
|
||||
@ -423,7 +422,7 @@ if ($result) {
|
||||
|
||||
// Payment type
|
||||
if ($arrayfields['type']['checked']) {
|
||||
print '<td class="liste_titre left">';
|
||||
print '<td class="liste_titre center">';
|
||||
$form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16, 1, 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
@ -498,7 +497,7 @@ if ($result) {
|
||||
print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], 'v.rowid', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if ($arrayfields['label']['checked']) {
|
||||
print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], 'v.label', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], 'v.label', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if ($arrayfields['datep']['checked']) {
|
||||
print_liste_field_titre($arrayfields['datep']['label'], $_SERVER["PHP_SELF"], 'v.datep,v.rowid', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
@ -507,7 +506,7 @@ if ($result) {
|
||||
print_liste_field_titre($arrayfields['datev']['label'], $_SERVER["PHP_SELF"], 'v.datev,v.rowid', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
}
|
||||
if ($arrayfields['type']['checked']) {
|
||||
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
}
|
||||
if ($arrayfields['project']['checked']) {
|
||||
print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder);
|
||||
@ -590,7 +589,7 @@ if ($result) {
|
||||
|
||||
// Type
|
||||
if ($arrayfields['type']['checked']) {
|
||||
print '<td>';
|
||||
print '<td class="center">';
|
||||
if ($obj->payment_code) {
|
||||
print $langs->trans("PaymentTypeShort".$obj->payment_code);
|
||||
print ' ';
|
||||
|
||||
@ -1093,6 +1093,19 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
$id = $object->create($user);
|
||||
if ($id < 0) {
|
||||
$error++;
|
||||
} else {
|
||||
// copy internal contacts
|
||||
if ($object->copy_linked_contact($facture_source, 'internal') < 0) {
|
||||
$error++;
|
||||
} elseif ($facture_source->socid == $object->socid) {
|
||||
// copy external contacts if same company
|
||||
if ($object->copy_linked_contact($facture_source, 'external') < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: Pb with situation invoice
|
||||
// NOTE: fields total on situation invoice are stored as cumulative values on total of lines (bad) but delta on invoice total
|
||||
@ -2955,12 +2968,12 @@ if ($action == 'create') {
|
||||
|
||||
// when payment condition is empty (means not override by payment condition form a other object, like third-party), try to use default value
|
||||
if (empty($cond_reglement_id)) {
|
||||
$cond_reglement_id = GETPOST("cond_reglement_id");
|
||||
$cond_reglement_id = GETPOST("cond_reglement_id", 'int');
|
||||
}
|
||||
|
||||
// when payment mode is empty (means not override by payment mode form a other object, like third-party), try to use default value
|
||||
if (empty($mode_reglement_id)) {
|
||||
$mode_reglement_id = GETPOST("mode_reglement_id");
|
||||
$mode_reglement_id = GETPOST("mode_reglement_id", 'int');
|
||||
}
|
||||
|
||||
if (!empty($soc->id)) {
|
||||
@ -3563,12 +3576,9 @@ if ($action == 'create') {
|
||||
|
||||
// Bank Account
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
if (GETPOSTISSET('fk_account')) {
|
||||
$fk_account = GETPOST('fk_account', 'int');
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
|
||||
print img_picto('', 'bank_account', 'class="paddingrightonly"').$form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, '', 1);
|
||||
$fk_account = GETPOST('fk_account', 'int');
|
||||
print img_picto('', 'bank_account', 'class="paddingrightonly"').$form->select_comptes(($fk_account < 0 ? '' : $fk_account), 'fk_account', 0, '', 1, '', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -4956,7 +4956,11 @@ class Facture extends CommonInvoice
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
$stmpidate = dol_print_date($tmpidate, 'day', 'gmt');
|
||||
$this->output .= $langs->trans("SearchUnpaidInvoicesWithDueDate", $stmpidate).'<br>';
|
||||
$this->output .= $langs->transnoentitiesnoconv("SearchUnpaidInvoicesWithDueDate", $stmpidate);
|
||||
if (!empty($paymentmode) && $paymentmode != 'all') {
|
||||
$this->output .= ' ('.$langs->transnoentitiesnoconv("PaymentMode").' '.$paymentmode.')';
|
||||
}
|
||||
$this->output .= '<br>';
|
||||
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2015-2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2019-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
|
||||
@ -315,23 +315,17 @@ if ($object->id > 0) {
|
||||
|
||||
$facidavoir = $object->getListIdAvoirFromInvoice();
|
||||
if (count($facidavoir) > 0) {
|
||||
print ' ('.$langs->transnoentities("InvoiceHasAvoir");
|
||||
$i = 0;
|
||||
foreach ($facidavoir as $id) {
|
||||
if ($i == 0) {
|
||||
print ' ';
|
||||
} else {
|
||||
print ',';
|
||||
}
|
||||
$invoicecredits = array();
|
||||
foreach ($facidavoir as $facid) {
|
||||
if ($type == 'bank-transfer') {
|
||||
$facavoir = new FactureFournisseur($db);
|
||||
} else {
|
||||
$facavoir = new Facture($db);
|
||||
}
|
||||
$facavoir->fetch($id);
|
||||
print $facavoir->getNomUrl(1);
|
||||
$facavoir->fetch($facid);
|
||||
$invoicecredits[] = $facavoir->getNomUrl(1);
|
||||
}
|
||||
print ')';
|
||||
print ' ('.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits) . ')';
|
||||
}
|
||||
/*
|
||||
if ($facidnext > 0)
|
||||
|
||||
@ -126,8 +126,8 @@ if ($action == 'create' && GETPOST("accountid", "int") > 0 && $user->rights->ban
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && !empty($_REQUEST['lang_id'])) {
|
||||
$newlang = $_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
|
||||
$newlang = GETPOST('lang_id', 'aZ09');
|
||||
}
|
||||
//if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||
if (!empty($newlang)) {
|
||||
@ -177,8 +177,8 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->banque-
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && !empty($_REQUEST['lang_id'])) {
|
||||
$newlang = $_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
|
||||
$newlang = GETPOST('lang_id', 'aZ09');
|
||||
}
|
||||
//if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||
if (!empty($newlang)) {
|
||||
@ -219,8 +219,8 @@ if ($action == 'builddoc' && $user->rights->banque->cheque) {
|
||||
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && !empty($_REQUEST['lang_id'])) {
|
||||
$newlang = $_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
|
||||
$newlang = GETPOST('lang_id', 'aZ09');
|
||||
}
|
||||
//if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||
if (!empty($newlang)) {
|
||||
|
||||
@ -419,7 +419,7 @@ if (!$error && $massaction == 'confirm_presend') {
|
||||
$substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ', array_keys($listofqualifiedobj)) : $objecttmp->id);
|
||||
$substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ', $listofqualifiedref) : $objecttmp->ref);
|
||||
$substitutionarray['__EMAIL__'] = $thirdparty->email;
|
||||
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
||||
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.urlencode($thirdparty->tag).'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
||||
|
||||
$parameters = array('mode'=>'formemail');
|
||||
|
||||
|
||||
@ -337,7 +337,7 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST
|
||||
// Make substitution in email content
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object);
|
||||
$substitutionarray['__EMAIL__'] = $sendto;
|
||||
$substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$object->thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>' : '';
|
||||
$substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.urlencode($object->thirdparty->tag).'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>' : '';
|
||||
|
||||
$parameters = array('mode'=>'formemail');
|
||||
complete_substitutions_array($substitutionarray, $langs, $object, $parameters);
|
||||
|
||||
@ -67,16 +67,18 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel',
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'setnote_private' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) {
|
||||
// Set public note
|
||||
if (empty($action) || !is_object($object) || empty($id)) {
|
||||
dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
}
|
||||
if (empty($object->id)) {
|
||||
$object->fetch($id); // Fetch may not be already done
|
||||
}
|
||||
$result = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES | ENT_HTML5), '_private');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} elseif ($action == 'setnote_private' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) { // Set public note
|
||||
if (empty($user->socid)) {
|
||||
// Private notes (always hidden to external users)
|
||||
if (empty($action) || !is_object($object) || empty($id)) {
|
||||
dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
}
|
||||
if (empty($object->id)) {
|
||||
$object->fetch($id); // Fetch may not be already done
|
||||
}
|
||||
$result = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES | ENT_HTML5), '_private');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,13 +60,6 @@ class box_dolibarr_state_board extends ModeleBoxes
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// disable box for such cases
|
||||
if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
||||
$this->enabled = 0; // disabled by this option
|
||||
}
|
||||
|
||||
$this->hidden = !(!empty($user->rights->societe->lire) && empty($user->socid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -142,6 +142,10 @@ class box_factures_fourn extends ModeleBoxes
|
||||
$facturestatic->status = $objp->status;
|
||||
$facturestatic->ref_supplier = $objp->ref_supplier;
|
||||
|
||||
$alreadypaid = $facturestatic->getSommePaiement();
|
||||
|
||||
$facturestatic->alreadypaid = $alreadypaid ? $alreadypaid : 0;
|
||||
|
||||
$thirdpartystatic->id = $objp->socid;
|
||||
$thirdpartystatic->name = $objp->name;
|
||||
$thirdpartystatic->name_alias = $objp->name_alias;
|
||||
@ -188,9 +192,6 @@ class box_factures_fourn extends ModeleBoxes
|
||||
'text' => dol_print_date($date, 'day'),
|
||||
);
|
||||
|
||||
$fac = new FactureFournisseur($this->db);
|
||||
$fac->fetch($objp->facid);
|
||||
$alreadypaid = $fac->getSommePaiement();
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $alreadypaid, $objp->type),
|
||||
|
||||
@ -134,6 +134,10 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
$facturestatic->statut = $objp->status;
|
||||
$facturestatic->status = $objp->status;
|
||||
|
||||
$alreadypaid = $facturestatic->getSommePaiement();
|
||||
|
||||
$facturestatic->alreadypaid = $alreadypaid ? $alreadypaid : 0;
|
||||
|
||||
$thirdpartystatic->id = $objp->socid;
|
||||
$thirdpartystatic->name = $objp->name;
|
||||
$thirdpartystatic->name_alias = $objp->name_alias;
|
||||
@ -174,9 +178,6 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
'text' => dol_print_date($datelimite, 'day'),
|
||||
);
|
||||
|
||||
$fac = new FactureFournisseur($this->db);
|
||||
$fac->fetch($objp->facid);
|
||||
$alreadypaid = $fac->getSommePaiement();
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $alreadypaid, $objp->type),
|
||||
|
||||
@ -132,7 +132,9 @@ class box_factures_imp extends ModeleBoxes
|
||||
|
||||
while ($line < $num) {
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
$datelimite = $this->db->jdate($objp->datelimite);
|
||||
|
||||
$facturestatic->id = $objp->facid;
|
||||
$facturestatic->ref = $objp->ref;
|
||||
$facturestatic->type = $objp->type;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Module descriptor for ticket system
|
||||
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -113,9 +113,6 @@ class box_last_modified_ticket extends ModeleBoxes
|
||||
while ($i < $num) {
|
||||
$objp = $this->db->fetch_object($resql);
|
||||
$datec = $this->db->jdate($objp->datec);
|
||||
$dateterm = $this->db->jdate($objp->fin_validite);
|
||||
$dateclose = $this->db->jdate($objp->date_cloture);
|
||||
$late = '';
|
||||
|
||||
$ticket = new Ticket($this->db);
|
||||
$ticket->id = $objp->id;
|
||||
@ -162,7 +159,6 @@ class box_last_modified_ticket extends ModeleBoxes
|
||||
);
|
||||
$r++;
|
||||
|
||||
|
||||
// Date creation
|
||||
$this->info_box_contents[$i][$r] = array(
|
||||
'td' => 'class="right"',
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012-2018 Charlene BENKE <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2015-2020 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015-2021 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -150,7 +150,7 @@ class box_task extends ModeleBoxes
|
||||
}
|
||||
|
||||
$sql = "SELECT pt.rowid, pt.ref, pt.fk_projet, pt.fk_task_parent, pt.datec, pt.dateo, pt.datee, pt.datev, pt.label, pt.description, pt.duration_effective, pt.planned_workload, pt.progress";
|
||||
$sql .= ", p.rowid project_id, p.ref project_ref, p.title project_title";
|
||||
$sql .= ", p.rowid project_id, p.ref project_ref, p.title project_title, p.fk_statut";
|
||||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task as pt";
|
||||
$sql .= " JOIN ".MAIN_DB_PREFIX."projet as p ON (pt.fk_projet = p.rowid)";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
/* Copyright (C) 2015-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Andreu Bisquerra <jove@bisquerra.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -224,6 +224,7 @@ class dolReceiptPrinter extends Printer
|
||||
'dol_value_vendor_lastname' => 'VendorLastname',
|
||||
'dol_value_vendor_firstname' => 'VendorFirstname',
|
||||
'dol_value_vendor_mail' => 'VendorEmail',
|
||||
'dol_value_place' => 'DOL_VALUE_PLACE',
|
||||
);
|
||||
}
|
||||
|
||||
@ -827,6 +828,14 @@ class dolReceiptPrinter extends Printer
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'DOL_VALUE_PLACE':
|
||||
$sql = "SELECT floor, label FROM ".MAIN_DB_PREFIX."takepos_floor_tables where rowid=".((int) str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $object->ref)));
|
||||
$resql = $this->db->query($sql);
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
if ($obj) {
|
||||
$this->printer->text($obj->label);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$this->printer->text($vals[$tplline]['tag']);
|
||||
$this->printer->text($vals[$tplline]['value']);
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
* Copyright (C) 2015 Charles-Fr BENKE <charles.fr@benke.fr>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -629,6 +629,8 @@ class ExtraFields
|
||||
*/
|
||||
public function update($attrname, $label, $type, $length, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0)
|
||||
{
|
||||
global $hookmanager;
|
||||
|
||||
if ($elementtype == 'thirdparty') {
|
||||
$elementtype = 'societe';
|
||||
}
|
||||
@ -674,6 +676,17 @@ class ExtraFields
|
||||
}
|
||||
$field_desc = array('type'=>$typedb, 'value'=>$lengthdb, 'null'=>($required ? 'NOT NULL' : 'NULL'), 'default'=>$default);
|
||||
|
||||
if (is_object($hookmanager)) {
|
||||
$hookmanager->initHooks(array('extrafieldsdao'));
|
||||
$parameters = array('field_desc'=>&$field_desc, 'table'=>$table, 'attr_name'=>$attrname, 'label'=>$label, 'type'=>$type, 'length'=>$length, 'unique'=>$unique, 'required'=>$required, 'pos'=>$pos, 'param'=>$param, 'alwayseditable'=>$alwayseditable, 'perms'=>$perms, 'list'=>$list, 'help'=>$help, 'default'=>$default, 'computed'=>$computed, 'entity'=>$entity, 'langfile'=>$langfile, 'enabled'=>$enabled, 'totalizable'=>$totalizable, 'printable'=>$printable);
|
||||
$reshook = $hookmanager->executeHooks('updateExtrafields', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
if ($reshook < 0) {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($type != 'separate') { // No table update when separate type
|
||||
$result = $this->db->DDLUpdateField(MAIN_DB_PREFIX.$table, $attrname, $field_desc);
|
||||
}
|
||||
|
||||
@ -7692,9 +7692,12 @@ class Form
|
||||
'order'=>array('enabled'=>$conf->commande->enabled, 'perms'=>1, 'label'=>'LinkToOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande').')'),
|
||||
'invoice'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
||||
'invoice_template'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToTemplateInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.titre as ref, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_rec as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
||||
'contrat'=>array('enabled'=>$conf->contrat->enabled, 'perms'=>1, 'label'=>'LinkToContract',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_customer as ref_client, t.ref_supplier, SUM(td.total_ht) as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as t, ".MAIN_DB_PREFIX."contratdet as td WHERE t.fk_soc = s.rowid AND td.fk_contrat = t.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('contract').')
|
||||
GROUP BY t.rowid,s.rowid,s.nom,s.client,t.ref,t.ref_supplier,t.ref_customer'),
|
||||
'contrat'=>array(
|
||||
'enabled'=>$conf->contrat->enabled,
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToContract',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_customer as ref_client, t.ref_supplier, SUM(td.total_ht) as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as t, ".MAIN_DB_PREFIX."contratdet as td WHERE t.fk_soc = s.rowid AND td.fk_contrat = t.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('contract').') GROUP BY s.rowid, s.nom, s.client, t.rowid, t.ref, t.ref_customer, t.ref_supplier'
|
||||
),
|
||||
'fichinter'=>array('enabled'=>$conf->ficheinter->enabled, 'perms'=>1, 'label'=>'LinkToIntervention', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('intervention').')'),
|
||||
'supplier_proposal'=>array('enabled'=>$conf->supplier_proposal->enabled, 'perms'=>1, 'label'=>'LinkToSupplierProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, '' as ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."supplier_proposal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('supplier_proposal').')'),
|
||||
'order_supplier'=>array('enabled'=>$conf->supplier_order->enabled, 'perms'=>1, 'label'=>'LinkToSupplierOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande_fournisseur as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande_fournisseur').')'),
|
||||
|
||||
@ -1633,6 +1633,9 @@ class FormMail extends Form
|
||||
$vars['__SECUREKEYPAYMENT_CONTRACTLINE__']='';
|
||||
*/
|
||||
}
|
||||
if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
||||
$substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = 'BlankSubscriptionForm';
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($tmparray as $key => $val) {
|
||||
|
||||
@ -56,6 +56,51 @@ class FormOther
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML code for scanner tool.
|
||||
* This must be called into an existing <form>
|
||||
*
|
||||
* @param string $jstoexecuteonadd Name of javascript function to call
|
||||
* @return string HTML component
|
||||
*/
|
||||
public function getHTMLScannerForm($jstoexecuteonadd = 'barcodscannerjs')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$out = '';
|
||||
|
||||
$out .= '<!-- Popup for mass barcode scanning -->'."\n";
|
||||
$out .= '<div class="div-for-modal-topright" style="padding: 15px">';
|
||||
$out .= '<center><strong>Barcode scanner tool...</strong></center><br>';
|
||||
|
||||
$out .= '<input type="checkbox" name="barcodeforautodetect" checked="checked"> Autodetect if we scan a product barcode or a lot/serial barcode<br>';
|
||||
$out .= '<input type="checkbox" name="barcodeforproduct"> Scan a product barcode<br>';
|
||||
$out .= '<input type="checkbox" name="barcodeforlotserial"> Scan a product lot or serial number<br>';
|
||||
|
||||
$out .= $langs->trans("QtyToAddAfterBarcodeScan").' <input type="text" name="barcodeproductqty" class="width50 right" value="1"><br>';
|
||||
$out .= '<textarea type="text" name="barcodelist" class="centpercent" autofocus rows="'.ROWS_3.'"></textarea>';
|
||||
|
||||
/*print '<br>'.$langs->trans("or").'<br>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<input type="text" name="barcodelotserial" class="width200"> Qty <input type="text" name="barcodelotserialqty" class="width50 right" value="1"><br>';
|
||||
*/
|
||||
$out .= '<br>';
|
||||
$out .= '<center>';
|
||||
$out .= '<input type="submit" class="button marginleftonly marginrightonly" name="addscan" value="'.$langs->trans("Add").'">';
|
||||
$out .= '<input type="submit" class="button marginleftonly marginrightonly" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
$out .= '<br>';
|
||||
|
||||
$out .= '<span class="opacitymedium">'.$langs->trans("FeatureNotYetAvailable").'</span>';
|
||||
|
||||
// TODO Add call of javascript $jstoexecuteonadd so each scan will add qty into the inventory page + an ajax save.
|
||||
|
||||
$out .= '</center>';
|
||||
$out .= '</div>';
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
|
||||
@ -103,11 +103,13 @@ class FormTicket
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->action = 'add';
|
||||
|
||||
$this->withcompany = 1;
|
||||
$this->withcompany = $conf->societe->enabled ? 1 : 0;
|
||||
$this->withfromsocid = 0;
|
||||
$this->withfromcontactid = 0;
|
||||
//$this->withthreadid=0;
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/class/rssparser.class.php
|
||||
@ -538,22 +538,18 @@ class RssParser
|
||||
|
||||
if ($el == 'channel') {
|
||||
$this->inchannel = true;
|
||||
} elseif ($el == 'item' or $el == 'entry') {
|
||||
} elseif ($el == 'item' || $el == 'entry') {
|
||||
$this->initem = true;
|
||||
if (isset($attrs['rdf:about'])) {
|
||||
$this->current_item['about'] = $attrs['rdf:about'];
|
||||
}
|
||||
} elseif ($this->_format == 'rss' and
|
||||
$this->current_namespace == '' and
|
||||
$el == 'textinput') {
|
||||
} elseif ($this->_format == 'rss' && $this->current_namespace == '' && $el == 'textinput') {
|
||||
// if we're in the default namespace of an RSS feed,
|
||||
// record textinput or image fields
|
||||
$this->intextinput = true;
|
||||
} elseif ($this->_format == 'rss' and
|
||||
$this->current_namespace == '' and
|
||||
$el == 'image') {
|
||||
} elseif ($this->_format == 'rss' && $this->current_namespace == '' && $el == 'image') {
|
||||
$this->inimage = true;
|
||||
} elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS)) {
|
||||
} elseif ($this->_format == 'atom' && in_array($el, $this->_CONTENT_CONSTRUCTS)) {
|
||||
// handle atom content constructs
|
||||
// avoid clashing w/ RSS mod_content
|
||||
if ($el == 'content') {
|
||||
@ -561,7 +557,7 @@ class RssParser
|
||||
}
|
||||
|
||||
$this->incontent = $el;
|
||||
} elseif ($this->_format == 'atom' and $this->incontent) {
|
||||
} elseif ($this->_format == 'atom' && $this->incontent) {
|
||||
// if inside an Atom content construct (e.g. content or summary) field treat tags as text
|
||||
// if tags are inlined, then flatten
|
||||
$attrs_str = join(' ', array_map('map_attrs', array_keys($attrs), array_values($attrs)));
|
||||
@ -569,7 +565,7 @@ class RssParser
|
||||
$this->append_content("<$element $attrs_str>");
|
||||
|
||||
array_unshift($this->stack, $el);
|
||||
} elseif ($this->_format == 'atom' and $el == 'link') {
|
||||
} elseif ($this->_format == 'atom' && $el == 'link') {
|
||||
// Atom support many links per containging element.
|
||||
// Magpie treats link elements of type rel='alternate'
|
||||
// as being equivalent to RSS's simple link element.
|
||||
|
||||
@ -354,7 +354,7 @@ class Utils
|
||||
$execmethod = 1;
|
||||
}
|
||||
|
||||
dol_syslog("Utils::dumpDatabase execmethod=".$execmethod." command:".$fullcommandcrypted, LOG_DEBUG);
|
||||
dol_syslog("Utils::dumpDatabase execmethod=".$execmethod." command:".$fullcommandcrypted, LOG_INFO);
|
||||
|
||||
// TODO Replace with executeCLI function
|
||||
if ($execmethod == 1) {
|
||||
|
||||
@ -294,7 +294,7 @@ function dol_shutdown()
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if we are in a context of submitting the parameter $paramname
|
||||
* Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
|
||||
*
|
||||
* @param string $paramname Name or parameter to test
|
||||
* @return boolean True if we have just submit a POST or GET request with the parameter provided (even if param is empty)
|
||||
@ -1386,7 +1386,9 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
|
||||
return;
|
||||
}
|
||||
|
||||
$message = preg_replace('/password=\'[^\']*\'/', 'password=\'hidden\'', $message); // protection to avoid to have value of password in log
|
||||
if (empty($conf->global->MAIN_SHOW_PASSWORD_INTO_LOG)) {
|
||||
$message = preg_replace('/password=\'[^\']*\'/', 'password=\'hidden\'', $message); // protection to avoid to have value of password in log
|
||||
}
|
||||
|
||||
// If adding log inside HTML page is required
|
||||
if ((!empty($_REQUEST['logtohtml']) && !empty($conf->global->MAIN_ENABLE_LOG_TO_HTML))
|
||||
@ -3503,14 +3505,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
|
||||
'off', 'on', 'order',
|
||||
'paiment', 'paragraph', 'play', 'pdf', 'phone', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'stock', 'resize', 'service', 'stats', 'trip',
|
||||
'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
|
||||
'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
|
||||
'github', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
||||
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
||||
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
|
||||
'partnership', 'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'projecttask', 'refresh', 'salary', 'shipment', 'supplier_invoice', 'technic', 'ticket',
|
||||
'error', 'warning',
|
||||
'recruitmentcandidature', 'recruitmentjobposition', 'resource',
|
||||
'shapes', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
|
||||
'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'resource',
|
||||
'shapes', 'supplier', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
|
||||
'timespent', 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda',
|
||||
'uncheck', 'user-cog', 'website', 'workstation',
|
||||
'conferenceorbooth', 'eventorganization'
|
||||
@ -3554,7 +3556,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'reception'=>'dolly', 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge',
|
||||
'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature',
|
||||
'refresh'=>'redo', 'resource'=>'laptop-house',
|
||||
'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||
'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s',
|
||||
'supplier'=>'building', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||
'timespent'=>'clock', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
||||
'title_agenda'=>'calendar-alt',
|
||||
'uncheck'=>'times', 'uparrow'=>'share', 'vcard'=>'address-card',
|
||||
@ -3596,7 +3599,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
if (in_array($pictowithouttext, array('conferenceorbooth', 'collab', 'eventorganization', 'holiday', 'info', 'project', 'workstation'))) {
|
||||
$morecss = 'em088';
|
||||
}
|
||||
if (in_array($pictowithouttext, array('intervention', 'payment', 'loan', 'partnership', 'stock', 'technic'))) {
|
||||
if (in_array($pictowithouttext, array('asset', 'intervention', 'payment', 'loan', 'partnership', 'stock', 'technic'))) {
|
||||
$morecss = 'em080';
|
||||
}
|
||||
|
||||
@ -3632,7 +3635,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'reception'=>'flip', 'recruitmentjobposition'=>'infobox-adherent', 'recruitmentcandidature'=>'infobox-adherent',
|
||||
'resource'=>'infobox-action',
|
||||
'salary'=>'infobox-bank_account', 'shipment'=>'infobox-commande', 'supplier_invoice'=>'infobox-order_supplier', 'supplier_invoicea'=>'infobox-order_supplier', 'supplier_invoiced'=>'infobox-order_supplier',
|
||||
'supplier_order'=>'infobox-order_supplier', 'supplier_proposal'=>'infobox-supplier_proposal',
|
||||
'supplier'=>'infobox-order_supplier', 'supplier_order'=>'infobox-order_supplier', 'supplier_proposal'=>'infobox-supplier_proposal',
|
||||
'ticket'=>'infobox-contrat', 'title_accountancy'=>'infobox-bank_account', 'title_hrm'=>'infobox-holiday', 'expensereport'=>'infobox-expensereport', 'trip'=>'infobox-expensereport', 'title_agenda'=>'infobox-action',
|
||||
//'title_setup'=>'infobox-action', 'tools'=>'infobox-action',
|
||||
'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode'
|
||||
@ -3653,7 +3656,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'other'=>'#ddd',
|
||||
'partnership'=>'#6c6aa8', 'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'reception'=>'#a69944', 'resize'=>'#444', 'rss'=>'#cba',
|
||||
//'shipment'=>'#a69944',
|
||||
'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'timespent'=>'#555',
|
||||
'security'=>'#999', 'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'timespent'=>'#555',
|
||||
'uncheck'=>'#800', 'uparrow'=>'#555', 'user-cog'=>'#999', 'country'=>'#aaa', 'globe-americas'=>'#aaa',
|
||||
'website'=>'#304', 'workstation'=>'#a69944'
|
||||
);
|
||||
@ -10229,14 +10232,20 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1)
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a button to copy $valuetoprint in the clipboard
|
||||
* Create a button to copy $valuetocopy in the clipboard
|
||||
*
|
||||
* @param string $valuetoprint The value to print
|
||||
* @param int $showonlyonhover Show the copypaste button only on hover
|
||||
* @param string $valuetocopy The value to print
|
||||
* @param int $showonlyonhover Show the copy-paste button only on hover
|
||||
* @param string $texttoshow Replace the value to show with this text
|
||||
* @return string The string to print for the button
|
||||
*/
|
||||
function showValueWithClipboardCPButton($valuetoprint, $showonlyonhover = 1)
|
||||
function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $texttoshow = '')
|
||||
{
|
||||
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><span class="clipboardCPValue">'.$valuetoprint.'</span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText opacitymedium"></span></span>';
|
||||
if ($texttoshow) {
|
||||
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><span class="clipboardCPValue hidewithsize">'.$valuetocopy.'</span><span class="clipboardCPValueToPrint">'.$texttoshow.'</span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText opacitymedium"></span></span>';
|
||||
} else {
|
||||
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><span class="clipboardCPValue">'.$valuetocopy.'</span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText opacitymedium"></span></span>';
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -1233,7 +1233,7 @@ function pdf_writeLinkedObjects(&$pdf, $object, $outputlangs, $posx, $posy, $w,
|
||||
/**
|
||||
* Output line description into PDF
|
||||
*
|
||||
* @param TCPDF $pdf PDF object
|
||||
* @param TCPDF $pdf PDF object
|
||||
* @param Object $object Object
|
||||
* @param int $i Current line number
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
|
||||
@ -467,6 +467,10 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
||||
if (!$user->rights->fournisseur->commande->supprimer) {
|
||||
$deleteok = 0;
|
||||
}
|
||||
} elseif ($feature == 'payment_supplier') {
|
||||
if (!$user->rights->fournisseur->facture->creer) {
|
||||
$deleteok = 0;
|
||||
}
|
||||
} elseif ($feature == 'banque') {
|
||||
if (!$user->rights->banque->modifier) {
|
||||
$deleteok = 0;
|
||||
|
||||
@ -316,8 +316,8 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
|
||||
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if (empty($newlang) && !empty($_REQUEST['lang_id'])) {
|
||||
$newlang = $_REQUEST['lang_id'];
|
||||
if (empty($newlang) && GETPOST('lang_id', 'aZ09')) {
|
||||
$newlang = GETPOST('lang_id', 'aZ09');
|
||||
}
|
||||
if (empty($newlang)) {
|
||||
$newlang = $object->thirdparty->default_lang;
|
||||
|
||||
@ -40,7 +40,7 @@ function supplier_proposal_prepare_head($object)
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/card.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('SupplierProposalCard');
|
||||
$head[$h][1] = $langs->trans('CommRequests');
|
||||
$head[$h][2] = 'comm';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ function ticket_prepare_head($object)
|
||||
$head[$h][2] = 'tabTicket';
|
||||
$h++;
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid)) {
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid) && $conf->societe->enabled) {
|
||||
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id;
|
||||
$head[$h][1] = $langs->trans('ContactsAddresses');
|
||||
@ -157,7 +157,8 @@ function showDirectPublicLink($object)
|
||||
|
||||
$out = '';
|
||||
if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
||||
$out .= '<span class="opacitymedium">'.$langs->trans("PublicInterfaceNotEnabled").'</span>';
|
||||
$langs->load('errors');
|
||||
$out .= '<span class="opacitymedium">'.$langs->trans("ErrorPublicInterfaceNotEnabled").'</span>';
|
||||
} else {
|
||||
$out .= img_picto('', 'object_globe.png').' <span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span><br>';
|
||||
if ($url) {
|
||||
|
||||
@ -502,7 +502,7 @@ function includeContainer($containerref)
|
||||
}
|
||||
$includehtmlcontentopened++;
|
||||
if ($includehtmlcontentopened > $MAXLEVEL) {
|
||||
print 'ERROR: RECURSIVE CONTENT LEVEL. Depth of recursive call is more than the limit of '.$MAXLEVEL.".\n";
|
||||
print 'ERROR: RECURSIVE CONTENT LEVEL. Depth of recursive call is more than the limit of '.((int) $MAXLEVEL).".\n";
|
||||
return;
|
||||
}
|
||||
|
||||
@ -549,20 +549,20 @@ function getStructuredData($type, $data = array())
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "'.dol_escape_json($data['name']).'",
|
||||
"operatingSystem": "'.dol_escape_json($data['os']).'",
|
||||
"applicationCategory": "https://schema.org/'.$data['applicationCategory'].'",';
|
||||
"applicationCategory": "https://schema.org/'.dol_escape_json($data['applicationCategory']).'",';
|
||||
if (!empty($data['ratingcount'])) {
|
||||
$ret .= '
|
||||
"aggregateRating": {
|
||||
"@type": "AggregateRating",
|
||||
"ratingValue": "'.$data['ratingvalue'].'",
|
||||
"ratingCount": "'.$data['ratingcount'].'"
|
||||
"ratingValue": "'.dol_escape_json($data['ratingvalue']).'",
|
||||
"ratingCount": "'.dol_escape_json($data['ratingcount']).'"
|
||||
},';
|
||||
}
|
||||
$ret .= '
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "'.$data['price'].'",
|
||||
"priceCurrency": "'.($data['currency'] ? $data['currency'] : $conf->currency).'"
|
||||
"price": "'.dol_escape_json($data['price']).'",
|
||||
"priceCurrency": "'.dol_escape_json($data['currency'] ? $data['currency'] : $conf->currency).'"
|
||||
}
|
||||
}'."\n";
|
||||
$ret .= '</script>'."\n";
|
||||
@ -618,7 +618,7 @@ function getStructuredData($type, $data = array())
|
||||
|
||||
$pageurl = str_replace('__WEBSITE_KEY__', $website->ref, $pageurl);
|
||||
$title = str_replace('__WEBSITE_KEY__', $website->ref, $title);
|
||||
$image = '/medias/'.str_replace('__WEBSITE_KEY__', $website->ref, $image);
|
||||
$image = '/medias'.(preg_match('/^\//', $image) ? '' : '/').str_replace('__WEBSITE_KEY__', $website->ref, $image);
|
||||
$companyname = str_replace('__WEBSITE_KEY__', $website->ref, $companyname);
|
||||
$description = str_replace('__WEBSITE_KEY__', $website->ref, $description);
|
||||
|
||||
@ -666,6 +666,8 @@ function getStructuredData($type, $data = array())
|
||||
$ret .= '"description": "'.dol_escape_json($description).'"';
|
||||
$ret .= "\n".'}'."\n";
|
||||
$ret .= '</script>'."\n";
|
||||
} else {
|
||||
$ret .= '<!-- no structured data inserted inline inside blogpost because no author_alias defined -->'."\n";
|
||||
}
|
||||
} elseif ($type == 'product') {
|
||||
$ret = '<!-- Add structured data for product -->'."\n";
|
||||
@ -691,8 +693,8 @@ function getStructuredData($type, $data = array())
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"url": "https://example.com/anvil",
|
||||
"priceCurrency": "'.($data['currency'] ? $data['currency'] : $conf->currency).'",
|
||||
"price": "'.$data['price'].'",
|
||||
"priceCurrency": "'.dol_escape_json($data['currency'] ? $data['currency'] : $conf->currency).'",
|
||||
"price": "'.dol_escape_json($data['price']).'",
|
||||
"itemCondition": "https://schema.org/UsedCondition",
|
||||
"availability": "https://schema.org/InStock",
|
||||
"seller": {
|
||||
|
||||
@ -1255,6 +1255,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $hookmanager;
|
||||
|
||||
$ltrdirection = 'L';
|
||||
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
|
||||
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies"));
|
||||
|
||||
@ -1300,7 +1303,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
} else {
|
||||
$text = $this->emetteur->name;
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1408,7 +1411,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1417,7 +1420,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show sender information
|
||||
@ -1462,20 +1465,20 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, $ltrdirection);
|
||||
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
@ -1422,6 +1422,9 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $hookmanager;
|
||||
|
||||
$ltrdirection = 'L';
|
||||
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
|
||||
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies"));
|
||||
|
||||
@ -1594,7 +1597,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1603,13 +1606,13 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show sender information
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0, $ltrdirection);
|
||||
|
||||
// If CUSTOMER contact defined, we use it
|
||||
$usecontact = false;
|
||||
@ -1647,20 +1650,20 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, $ltrdirection);
|
||||
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
@ -823,7 +823,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -849,7 +849,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("DeliveryAddress").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("DeliveryAddress"), 0, 'L');
|
||||
|
||||
// If SHIPPING contact defined on order, we use it
|
||||
$usecontact = false;
|
||||
|
||||
@ -822,7 +822,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -848,7 +848,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("DeliveryAddress").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("DeliveryAddress"), 0, 'L');
|
||||
|
||||
// If SHIPPING contact defined on order, we use it
|
||||
$usecontact = false;
|
||||
|
||||
@ -1090,7 +1090,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("Sender").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1143,7 +1143,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient"), 0, 'L');
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
|
||||
@ -1039,7 +1039,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("Sender").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1092,7 +1092,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient"), 0, 'L');
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
|
||||
@ -796,7 +796,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("TripSociete")." :", '', 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("TripSociete"), '', 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(224, 224, 224);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
|
||||
@ -1607,12 +1607,16 @@ class pdf_crabe extends ModelePDFFactures
|
||||
* @param Facture $object Object to show
|
||||
* @param int $showaddress 0=no, 1=yes
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param Translate $outputlangsbis Object lang for output bis
|
||||
* @return void
|
||||
*/
|
||||
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$ltrdirection = 'L';
|
||||
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
|
||||
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "propal", "companies"));
|
||||
|
||||
@ -1621,7 +1625,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
|
||||
|
||||
// Show Draft Watermark
|
||||
if ($object->statut == Facture::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) {
|
||||
if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) {
|
||||
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FACTURE_DRAFT_WATERMARK);
|
||||
}
|
||||
|
||||
@ -1658,7 +1662,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
} else {
|
||||
$text = $this->emetteur->name;
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1681,6 +1685,23 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if ($this->situationinvoice) {
|
||||
$title = $outputlangs->transnoentities("PDFInvoiceSituation");
|
||||
}
|
||||
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
|
||||
$title .= ' - ';
|
||||
if ($object->type == 0) {
|
||||
if ($this->situationinvoice) {
|
||||
$title .= $outputlangsbis->transnoentities("PDFInvoiceSituation");
|
||||
}
|
||||
$title .= $outputlangsbis->transnoentities("PdfInvoiceTitle");
|
||||
} elseif ($object->type == 1) {
|
||||
$title .= $outputlangsbis->transnoentities("InvoiceReplacement");
|
||||
} elseif ($object->type == 2) {
|
||||
$title .= $outputlangsbis->transnoentities("InvoiceAvoir");
|
||||
} elseif ($object->type == 3) {
|
||||
$title .= $outputlangsbis->transnoentities("InvoiceDeposit");
|
||||
} elseif ($object->type == 4) {
|
||||
$title .= $outputlangsbis->transnoentities("InvoiceProForma");
|
||||
}
|
||||
}
|
||||
$pdf->MultiCell($w, 3, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
@ -1689,7 +1710,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref);
|
||||
if ($object->statut == Facture::STATUS_DRAFT) {
|
||||
if ($object->statut == $object::STATUS_DRAFT) {
|
||||
$pdf->SetTextColor(128, 0, 0);
|
||||
$textref .= ' - '.$outputlangs->transnoentities("NotValidated");
|
||||
}
|
||||
@ -1758,7 +1779,11 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy += 4;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateInvoice")." : ".dol_print_date($object->date, "day", false, $outputlangs), '', 'R');
|
||||
$title = $outputlangs->transnoentities("DateInvoice");
|
||||
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
|
||||
$title .= ' - '.$outputlangsbis->transnoentities("DateInvoice");
|
||||
}
|
||||
$pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
|
||||
|
||||
if (!empty($conf->global->INVOICE_POINTOFTAX_DATE)) {
|
||||
$posy += 4;
|
||||
@ -1771,7 +1796,11 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy += 3;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateDue")." : ".dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R');
|
||||
$title = $outputlangs->transnoentities("DateDue");
|
||||
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
|
||||
$title .= ' - '.$outputlangsbis->transnoentities("DateDue");
|
||||
}
|
||||
$pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R');
|
||||
}
|
||||
|
||||
if ($object->thirdparty->code_client) {
|
||||
@ -1824,7 +1853,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1833,14 +1862,13 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show sender information
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0, 'L');
|
||||
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0, $ltrdirection);
|
||||
|
||||
|
||||
// If BILLING contact defined on invoice, we use it
|
||||
@ -1879,20 +1907,20 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 2, $carac_client_name, 0, $ltrdirection);
|
||||
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_client, 0, $ltrdirection);
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
@ -1851,6 +1851,9 @@ class pdf_sponge extends ModelePDFFactures
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$ltrdirection = 'L';
|
||||
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
|
||||
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "propal", "companies"));
|
||||
|
||||
@ -1896,7 +1899,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
}
|
||||
} else {
|
||||
$text = $this->emetteur->name;
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2088,7 +2091,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
|
||||
@ -2097,15 +2100,15 @@ class pdf_sponge extends ModelePDFFactures
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show sender information
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0, $ltrdirection);
|
||||
|
||||
// If BILLING contact defined, we use it
|
||||
// If BILLING contact defined on invoice, we use it
|
||||
$usecontact = false;
|
||||
$arrayidcontact = $object->getIdContact('external', 'BILLING');
|
||||
if (count($arrayidcontact) > 0) {
|
||||
@ -2141,20 +2144,20 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 2, $carac_client_name, 0, $ltrdirection);
|
||||
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_client, 0, $ltrdirection);
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
@ -528,7 +528,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
|
||||
if (empty($hidebottom)) {
|
||||
$pdf->SetXY(20, 230);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("NameAndSignatureOfInternalContact"), 0, 'L', 0);
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("NameAndSignatureOfInternalContact"), 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY(20, 235);
|
||||
$pdf->MultiCell(80, 25, '', 1);
|
||||
|
||||
@ -69,7 +69,7 @@ class modAsset extends DolibarrModules
|
||||
// Name of image file used for this module.
|
||||
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
||||
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
||||
$this->picto = 'accounting';
|
||||
$this->picto = 'asset';
|
||||
|
||||
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
|
||||
// for default path (eg: /asset/core/xxxxx) (0=disable, 1=enable)
|
||||
|
||||
@ -1158,7 +1158,7 @@ class pdf_stdandard extends ModelePDFMovement
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posx,$posy-5);
|
||||
$pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetFillColor(230,230,230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
|
||||
@ -815,7 +815,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posx,$posy-5);
|
||||
$pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetFillColor(230,230,230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
|
||||
@ -1419,6 +1419,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$ltrdirection = 'L';
|
||||
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
|
||||
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills"));
|
||||
|
||||
@ -1462,7 +1465,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
}
|
||||
} else {
|
||||
$text = $this->emetteur->name;
|
||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1513,7 +1516,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$posy += 4;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DatePropal")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
|
||||
|
||||
$posy += 4;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
@ -1575,7 +1578,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1584,13 +1587,13 @@ class pdf_azur extends ModelePDFPropales
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show sender information
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, $ltrdirection);
|
||||
|
||||
|
||||
// If CUSTOMER contact defined, we use it
|
||||
@ -1628,20 +1631,20 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection);
|
||||
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
@ -1519,6 +1519,9 @@ class pdf_cyan extends ModelePDFPropales
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$ltrdirection = 'L';
|
||||
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
|
||||
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills"));
|
||||
|
||||
@ -1564,7 +1567,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
}
|
||||
} else {
|
||||
$text = $this->emetteur->name;
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1690,7 +1693,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1699,13 +1702,13 @@ class pdf_cyan extends ModelePDFPropales
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show sender information
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0, $ltrdirection);
|
||||
|
||||
|
||||
// If CUSTOMER contact defined, we use it
|
||||
@ -1744,20 +1747,20 @@ class pdf_cyan extends ModelePDFPropales
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, $ltrdirection);
|
||||
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
@ -388,6 +388,18 @@ class pdf_squille extends ModelePdfReception
|
||||
// Description of product line
|
||||
$curX = $this->posxdesc - 1;
|
||||
|
||||
// The desc of line is not store into reception, so we force it to the value of product.
|
||||
/*
|
||||
if (empty($object->lines[0]->desc)) {
|
||||
// TODO We must get value from fk_commendefourndet
|
||||
$sqldesc = 'SELECT description FROM '.MAIN_DB_PREFIX.' WHERE rowid = '.((int) $object->lines[0]->fk_commandefourndet);
|
||||
$resqldesc = $this->db->query($sqldesc);
|
||||
if ($resqldesc) {
|
||||
$objdesc = $this->db->fetch_object($resqldesc);
|
||||
$object->lines[0]->desc = $objdesc->description;
|
||||
}
|
||||
}*/
|
||||
|
||||
$pdf->startTransaction();
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxpicture - $curX, 3, $curX, $curY, $hideref, $hidedesc);
|
||||
|
||||
@ -934,7 +946,7 @@ class pdf_squille extends ModelePdfReception
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("Sender").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
|
||||
@ -988,7 +1000,7 @@ class pdf_squille extends ModelePdfReception
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient"), 0, 'L');
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
|
||||
|
||||
@ -348,6 +348,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
||||
if ($soc->id > 0) {
|
||||
$sql .= " AND rowid <> ".$soc->id;
|
||||
}
|
||||
$sql .= " AND entity IN (".getEntity('societe').")";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
|
||||
@ -1211,7 +1211,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1264,7 +1264,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, 'L');
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
|
||||
@ -1211,6 +1211,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
{
|
||||
global $langs, $conf, $mysoc;
|
||||
|
||||
$ltrdirection = 'L';
|
||||
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
|
||||
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings"));
|
||||
|
||||
@ -1248,7 +1251,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
}
|
||||
} else {
|
||||
$text = $this->emetteur->name;
|
||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
}
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size + 3);
|
||||
@ -1369,7 +1372,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1378,13 +1381,13 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show sender information
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, $ltrdirection);
|
||||
|
||||
|
||||
|
||||
@ -1422,20 +1425,20 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection);
|
||||
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
|
||||
}
|
||||
|
||||
return $top_shift;
|
||||
|
||||
@ -1119,6 +1119,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
{
|
||||
global $langs, $conf, $mysoc;
|
||||
|
||||
$ltrdirection = 'L';
|
||||
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
|
||||
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings"));
|
||||
|
||||
@ -1156,7 +1159,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
} else {
|
||||
$text = $this->emetteur->name;
|
||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
}
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size + 3);
|
||||
@ -1277,7 +1280,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1286,13 +1289,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show sender information
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, $ltrdirection);
|
||||
|
||||
|
||||
// If CUSTOMER contact defined on order, we use it. Note: Even if this is a supplier object, the code for external contat that follow order is 'CUSTOMER'
|
||||
@ -1329,20 +1332,20 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx + 2, $posy + 3);
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection);
|
||||
|
||||
$posy = $pdf->getY();
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetXY($posx + 2, $posy);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
|
||||
}
|
||||
|
||||
return $top_shift;
|
||||
|
||||
@ -757,7 +757,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("PayedBy").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("PayedBy"), 0, 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -798,7 +798,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("PayedTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("PayedTo"), 0, 'L');
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
|
||||
@ -1383,7 +1383,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx, $posy - 5);
|
||||
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFillColor(230, 230, 230);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
@ -1439,7 +1439,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posx + 2, $posy - 5);
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, 'L');
|
||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user