Merge remote-tracking branch 'upstream/develop' into membertooltip

This commit is contained in:
Frédéric FRANCE 2023-02-14 21:02:48 +01:00
commit bebd6175b2
33 changed files with 996 additions and 746 deletions

View File

@ -2,439 +2,439 @@
host = https://www.transifex.com host = https://www.transifex.com
lang_map = uz: uz_UZ, sw: sw_SW, sr@latin: sr_RS lang_map = uz: uz_UZ, sw: sw_SW, sr@latin: sr_RS
[dolibarr.accountancy] [o:dolibarr-association:p:dolibarr:r:accountancy]
file_filter = htdocs/langs/<lang>/accountancy.lang file_filter = htdocs/langs/<lang>/accountancy.lang
source_file = htdocs/langs/en_US/accountancy.lang source_file = htdocs/langs/en_US/accountancy.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.admin] [o:dolibarr-association:p:dolibarr:r:admin]
file_filter = htdocs/langs/<lang>/admin.lang file_filter = htdocs/langs/<lang>/admin.lang
source_file = htdocs/langs/en_US/admin.lang source_file = htdocs/langs/en_US/admin.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.agenda] [o:dolibarr-association:p:dolibarr:r:agenda]
file_filter = htdocs/langs/<lang>/agenda.lang file_filter = htdocs/langs/<lang>/agenda.lang
source_file = htdocs/langs/en_US/agenda.lang source_file = htdocs/langs/en_US/agenda.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.assets] [o:dolibarr-association:p:dolibarr:r:assets]
file_filter = htdocs/langs/<lang>/assets.lang file_filter = htdocs/langs/<lang>/assets.lang
source_file = htdocs/langs/en_US/assets.lang source_file = htdocs/langs/en_US/assets.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.banks] [o:dolibarr-association:p:dolibarr:r:banks]
file_filter = htdocs/langs/<lang>/banks.lang file_filter = htdocs/langs/<lang>/banks.lang
source_file = htdocs/langs/en_US/banks.lang source_file = htdocs/langs/en_US/banks.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.bills] [o:dolibarr-association:p:dolibarr:r:bills]
file_filter = htdocs/langs/<lang>/bills.lang file_filter = htdocs/langs/<lang>/bills.lang
source_file = htdocs/langs/en_US/bills.lang source_file = htdocs/langs/en_US/bills.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.blockedlog] [o:dolibarr-association:p:dolibarr:r:blockedlog]
file_filter = htdocs/langs/<lang>/blockedlog.lang file_filter = htdocs/langs/<lang>/blockedlog.lang
source_file = htdocs/langs/en_US/blockedlog.lang source_file = htdocs/langs/en_US/blockedlog.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.bookmarks] [o:dolibarr-association:p:dolibarr:r:bookmarks]
file_filter = htdocs/langs/<lang>/bookmarks.lang file_filter = htdocs/langs/<lang>/bookmarks.lang
source_file = htdocs/langs/en_US/bookmarks.lang source_file = htdocs/langs/en_US/bookmarks.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.boxes] [o:dolibarr-association:p:dolibarr:r:boxes]
file_filter = htdocs/langs/<lang>/boxes.lang file_filter = htdocs/langs/<lang>/boxes.lang
source_file = htdocs/langs/en_US/boxes.lang source_file = htdocs/langs/en_US/boxes.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.cashdesk] [o:dolibarr-association:p:dolibarr:r:cashdesk]
file_filter = htdocs/langs/<lang>/cashdesk.lang file_filter = htdocs/langs/<lang>/cashdesk.lang
source_file = htdocs/langs/en_US/cashdesk.lang source_file = htdocs/langs/en_US/cashdesk.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.categories] [o:dolibarr-association:p:dolibarr:r:categories]
file_filter = htdocs/langs/<lang>/categories.lang file_filter = htdocs/langs/<lang>/categories.lang
source_file = htdocs/langs/en_US/categories.lang source_file = htdocs/langs/en_US/categories.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.commercial] [o:dolibarr-association:p:dolibarr:r:commercial]
file_filter = htdocs/langs/<lang>/commercial.lang file_filter = htdocs/langs/<lang>/commercial.lang
source_file = htdocs/langs/en_US/commercial.lang source_file = htdocs/langs/en_US/commercial.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.companies] [o:dolibarr-association:p:dolibarr:r:companies]
file_filter = htdocs/langs/<lang>/companies.lang file_filter = htdocs/langs/<lang>/companies.lang
source_file = htdocs/langs/en_US/companies.lang source_file = htdocs/langs/en_US/companies.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.compta] [o:dolibarr-association:p:dolibarr:r:compta]
file_filter = htdocs/langs/<lang>/compta.lang file_filter = htdocs/langs/<lang>/compta.lang
source_file = htdocs/langs/en_US/compta.lang source_file = htdocs/langs/en_US/compta.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.contracts] [o:dolibarr-association:p:dolibarr:r:contracts]
file_filter = htdocs/langs/<lang>/contracts.lang file_filter = htdocs/langs/<lang>/contracts.lang
source_file = htdocs/langs/en_US/contracts.lang source_file = htdocs/langs/en_US/contracts.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.cron] [o:dolibarr-association:p:dolibarr:r:cron]
file_filter = htdocs/langs/<lang>/cron.lang file_filter = htdocs/langs/<lang>/cron.lang
source_file = htdocs/langs/en_US/cron.lang source_file = htdocs/langs/en_US/cron.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.datapolicy] [o:dolibarr-association:p:dolibarr:r:datapolicy]
file_filter = htdocs/langs/<lang>/datapolicy.lang file_filter = htdocs/langs/<lang>/datapolicy.lang
source_file = htdocs/langs/en_US/datapolicy.lang source_file = htdocs/langs/en_US/datapolicy.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.deliveries] [o:dolibarr-association:p:dolibarr:r:deliveries]
file_filter = htdocs/langs/<lang>/deliveries.lang file_filter = htdocs/langs/<lang>/deliveries.lang
source_file = htdocs/langs/en_US/deliveries.lang source_file = htdocs/langs/en_US/deliveries.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.dict] [o:dolibarr-association:p:dolibarr:r:dict]
file_filter = htdocs/langs/<lang>/dict.lang file_filter = htdocs/langs/<lang>/dict.lang
source_file = htdocs/langs/en_US/dict.lang source_file = htdocs/langs/en_US/dict.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.donations] [o:dolibarr-association:p:dolibarr:r:donations]
file_filter = htdocs/langs/<lang>/donations.lang file_filter = htdocs/langs/<lang>/donations.lang
source_file = htdocs/langs/en_US/donations.lang source_file = htdocs/langs/en_US/donations.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.ecm] [o:dolibarr-association:p:dolibarr:r:ecm]
file_filter = htdocs/langs/<lang>/ecm.lang file_filter = htdocs/langs/<lang>/ecm.lang
source_file = htdocs/langs/en_US/ecm.lang source_file = htdocs/langs/en_US/ecm.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.errors] [o:dolibarr-association:p:dolibarr:r:errors]
file_filter = htdocs/langs/<lang>/errors.lang file_filter = htdocs/langs/<lang>/errors.lang
source_file = htdocs/langs/en_US/errors.lang source_file = htdocs/langs/en_US/errors.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.eventorganization] [o:dolibarr-association:p:dolibarr:r:eventorganization]
file_filter = htdocs/langs/<lang>/eventorganization.lang file_filter = htdocs/langs/<lang>/eventorganization.lang
source_file = htdocs/langs/en_US/eventorganization.lang source_file = htdocs/langs/en_US/eventorganization.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.exports] [o:dolibarr-association:p:dolibarr:r:exports]
file_filter = htdocs/langs/<lang>/exports.lang file_filter = htdocs/langs/<lang>/exports.lang
source_file = htdocs/langs/en_US/exports.lang source_file = htdocs/langs/en_US/exports.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.help] [o:dolibarr-association:p:dolibarr:r:help]
file_filter = htdocs/langs/<lang>/help.lang file_filter = htdocs/langs/<lang>/help.lang
source_file = htdocs/langs/en_US/help.lang source_file = htdocs/langs/en_US/help.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.holiday] [o:dolibarr-association:p:dolibarr:r:holiday]
file_filter = htdocs/langs/<lang>/holiday.lang file_filter = htdocs/langs/<lang>/holiday.lang
source_file = htdocs/langs/en_US/holiday.lang source_file = htdocs/langs/en_US/holiday.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.hrm] [o:dolibarr-association:p:dolibarr:r:hrm]
file_filter = htdocs/langs/<lang>/hrm.lang file_filter = htdocs/langs/<lang>/hrm.lang
source_file = htdocs/langs/en_US/hrm.lang source_file = htdocs/langs/en_US/hrm.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.install] [o:dolibarr-association:p:dolibarr:r:install]
file_filter = htdocs/langs/<lang>/install.lang file_filter = htdocs/langs/<lang>/install.lang
source_file = htdocs/langs/en_US/install.lang source_file = htdocs/langs/en_US/install.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.interventions] [o:dolibarr-association:p:dolibarr:r:interventions]
file_filter = htdocs/langs/<lang>/interventions.lang file_filter = htdocs/langs/<lang>/interventions.lang
source_file = htdocs/langs/en_US/interventions.lang source_file = htdocs/langs/en_US/interventions.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.intracommreport] [o:dolibarr-association:p:dolibarr:r:intracommreport]
file_filter = htdocs/langs/<lang>/intracommreport.lang file_filter = htdocs/langs/<lang>/intracommreport.lang
source_file = htdocs/langs/en_US/intracommreport.lang source_file = htdocs/langs/en_US/intracommreport.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.knowledgemanagement] [o:dolibarr-association:p:dolibarr:r:knowledgemanagement]
file_filter = htdocs/langs/<lang>/knowledgemanagement.lang file_filter = htdocs/langs/<lang>/knowledgemanagement.lang
source_file = htdocs/langs/en_US/knowledgemanagement.lang source_file = htdocs/langs/en_US/knowledgemanagement.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.languages-not-res] [o:dolibarr-association:p:dolibarr:r:languages-not-res]
file_filter = htdocs/langs/<lang>/languages.lang file_filter = htdocs/langs/<lang>/languages.lang
source_file = htdocs/langs/en_US/languages.lang source_file = htdocs/langs/en_US/languages.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.ldap] [o:dolibarr-association:p:dolibarr:r:ldap]
file_filter = htdocs/langs/<lang>/ldap.lang file_filter = htdocs/langs/<lang>/ldap.lang
source_file = htdocs/langs/en_US/ldap.lang source_file = htdocs/langs/en_US/ldap.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.link] [o:dolibarr-association:p:dolibarr:r:link]
file_filter = htdocs/langs/<lang>/link.lang file_filter = htdocs/langs/<lang>/link.lang
source_file = htdocs/langs/en_US/link.lang source_file = htdocs/langs/en_US/link.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.loan] [o:dolibarr-association:p:dolibarr:r:loan]
file_filter = htdocs/langs/<lang>/loan.lang file_filter = htdocs/langs/<lang>/loan.lang
source_file = htdocs/langs/en_US/loan.lang source_file = htdocs/langs/en_US/loan.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.mailmanspip] [o:dolibarr-association:p:dolibarr:r:mailmanspip]
file_filter = htdocs/langs/<lang>/mailmanspip.lang file_filter = htdocs/langs/<lang>/mailmanspip.lang
source_file = htdocs/langs/en_US/mailmanspip.lang source_file = htdocs/langs/en_US/mailmanspip.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.mails] [o:dolibarr-association:p:dolibarr:r:mails]
file_filter = htdocs/langs/<lang>/mails.lang file_filter = htdocs/langs/<lang>/mails.lang
source_file = htdocs/langs/en_US/mails.lang source_file = htdocs/langs/en_US/mails.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.main] [o:dolibarr-association:p:dolibarr:r:main]
file_filter = htdocs/langs/<lang>/main.lang file_filter = htdocs/langs/<lang>/main.lang
source_file = htdocs/langs/en_US/main.lang source_file = htdocs/langs/en_US/main.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.margins] [o:dolibarr-association:p:dolibarr:r:margins]
file_filter = htdocs/langs/<lang>/margins.lang file_filter = htdocs/langs/<lang>/margins.lang
source_file = htdocs/langs/en_US/margins.lang source_file = htdocs/langs/en_US/margins.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.members] [o:dolibarr-association:p:dolibarr:r:members]
file_filter = htdocs/langs/<lang>/members.lang file_filter = htdocs/langs/<lang>/members.lang
source_file = htdocs/langs/en_US/members.lang source_file = htdocs/langs/en_US/members.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.modulebuilder] [o:dolibarr-association:p:dolibarr:r:modulebuilder]
file_filter = htdocs/langs/<lang>/modulebuilder.lang file_filter = htdocs/langs/<lang>/modulebuilder.lang
source_file = htdocs/langs/en_US/modulebuilder.lang source_file = htdocs/langs/en_US/modulebuilder.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.mrp] [o:dolibarr-association:p:dolibarr:r:mrp]
file_filter = htdocs/langs/<lang>/mrp.lang file_filter = htdocs/langs/<lang>/mrp.lang
source_file = htdocs/langs/en_US/mrp.lang source_file = htdocs/langs/en_US/mrp.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.multicurrency] [o:dolibarr-association:p:dolibarr:r:multicurrency]
file_filter = htdocs/langs/<lang>/multicurrency.lang file_filter = htdocs/langs/<lang>/multicurrency.lang
source_file = htdocs/langs/en_US/multicurrency.lang source_file = htdocs/langs/en_US/multicurrency.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.oauth] [o:dolibarr-association:p:dolibarr:r:oauth]
file_filter = htdocs/langs/<lang>/oauth.lang file_filter = htdocs/langs/<lang>/oauth.lang
source_file = htdocs/langs/en_US/oauth.lang source_file = htdocs/langs/en_US/oauth.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.opensurvey] [o:dolibarr-association:p:dolibarr:r:opensurvey]
file_filter = htdocs/langs/<lang>/opensurvey.lang file_filter = htdocs/langs/<lang>/opensurvey.lang
source_file = htdocs/langs/en_US/opensurvey.lang source_file = htdocs/langs/en_US/opensurvey.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.orders] [o:dolibarr-association:p:dolibarr:r:orders]
file_filter = htdocs/langs/<lang>/orders.lang file_filter = htdocs/langs/<lang>/orders.lang
source_file = htdocs/langs/en_US/orders.lang source_file = htdocs/langs/en_US/orders.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.other] [o:dolibarr-association:p:dolibarr:r:other]
file_filter = htdocs/langs/<lang>/other.lang file_filter = htdocs/langs/<lang>/other.lang
source_file = htdocs/langs/en_US/other.lang source_file = htdocs/langs/en_US/other.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.partnership] [o:dolibarr-association:p:dolibarr:r:partnership]
file_filter = htdocs/langs/<lang>/partnership.lang file_filter = htdocs/langs/<lang>/partnership.lang
source_file = htdocs/langs/en_US/partnership.lang source_file = htdocs/langs/en_US/partnership.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.paybox] [o:dolibarr-association:p:dolibarr:r:paybox]
file_filter = htdocs/langs/<lang>/paybox.lang file_filter = htdocs/langs/<lang>/paybox.lang
source_file = htdocs/langs/en_US/paybox.lang source_file = htdocs/langs/en_US/paybox.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.paypal] [o:dolibarr-association:p:dolibarr:r:paypal]
file_filter = htdocs/langs/<lang>/paypal.lang file_filter = htdocs/langs/<lang>/paypal.lang
source_file = htdocs/langs/en_US/paypal.lang source_file = htdocs/langs/en_US/paypal.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.printing] [o:dolibarr-association:p:dolibarr:r:printing]
file_filter = htdocs/langs/<lang>/printing.lang file_filter = htdocs/langs/<lang>/printing.lang
source_file = htdocs/langs/en_US/printing.lang source_file = htdocs/langs/en_US/printing.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.productbatch] [o:dolibarr-association:p:dolibarr:r:productbatch]
file_filter = htdocs/langs/<lang>/productbatch.lang file_filter = htdocs/langs/<lang>/productbatch.lang
source_file = htdocs/langs/en_US/productbatch.lang source_file = htdocs/langs/en_US/productbatch.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.products] [o:dolibarr-association:p:dolibarr:r:products]
file_filter = htdocs/langs/<lang>/products.lang file_filter = htdocs/langs/<lang>/products.lang
source_file = htdocs/langs/en_US/products.lang source_file = htdocs/langs/en_US/products.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.projects] [o:dolibarr-association:p:dolibarr:r:projects]
file_filter = htdocs/langs/<lang>/projects.lang file_filter = htdocs/langs/<lang>/projects.lang
source_file = htdocs/langs/en_US/projects.lang source_file = htdocs/langs/en_US/projects.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.propal] [o:dolibarr-association:p:dolibarr:r:propal]
file_filter = htdocs/langs/<lang>/propal.lang file_filter = htdocs/langs/<lang>/propal.lang
source_file = htdocs/langs/en_US/propal.lang source_file = htdocs/langs/en_US/propal.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.receiptprinter] [o:dolibarr-association:p:dolibarr:r:receiptprinter]
file_filter = htdocs/langs/<lang>/receiptprinter.lang file_filter = htdocs/langs/<lang>/receiptprinter.lang
source_file = htdocs/langs/en_US/receiptprinter.lang source_file = htdocs/langs/en_US/receiptprinter.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.receptions] [o:dolibarr-association:p:dolibarr:r:receptions]
file_filter = htdocs/langs/<lang>/receptions.lang file_filter = htdocs/langs/<lang>/receptions.lang
source_file = htdocs/langs/en_US/receptions.lang source_file = htdocs/langs/en_US/receptions.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.recruitment] [o:dolibarr-association:p:dolibarr:r:recruitment]
file_filter = htdocs/langs/<lang>/recruitment.lang file_filter = htdocs/langs/<lang>/recruitment.lang
source_file = htdocs/langs/en_US/recruitment.lang source_file = htdocs/langs/en_US/recruitment.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.resource] [o:dolibarr-association:p:dolibarr:r:resource]
file_filter = htdocs/langs/<lang>/resource.lang file_filter = htdocs/langs/<lang>/resource.lang
source_file = htdocs/langs/en_US/resource.lang source_file = htdocs/langs/en_US/resource.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.salaries] [o:dolibarr-association:p:dolibarr:r:salaries]
file_filter = htdocs/langs/<lang>/salaries.lang file_filter = htdocs/langs/<lang>/salaries.lang
source_file = htdocs/langs/en_US/salaries.lang source_file = htdocs/langs/en_US/salaries.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.sendings] [o:dolibarr-association:p:dolibarr:r:sendings]
file_filter = htdocs/langs/<lang>/sendings.lang file_filter = htdocs/langs/<lang>/sendings.lang
source_file = htdocs/langs/en_US/sendings.lang source_file = htdocs/langs/en_US/sendings.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.sms] [o:dolibarr-association:p:dolibarr:r:sms]
file_filter = htdocs/langs/<lang>/sms.lang file_filter = htdocs/langs/<lang>/sms.lang
source_file = htdocs/langs/en_US/sms.lang source_file = htdocs/langs/en_US/sms.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.stocks] [o:dolibarr-association:p:dolibarr:r:stocks]
file_filter = htdocs/langs/<lang>/stocks.lang file_filter = htdocs/langs/<lang>/stocks.lang
source_file = htdocs/langs/en_US/stocks.lang source_file = htdocs/langs/en_US/stocks.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.stripe] [o:dolibarr-association:p:dolibarr:r:stripe]
file_filter = htdocs/langs/<lang>/stripe.lang file_filter = htdocs/langs/<lang>/stripe.lang
source_file = htdocs/langs/en_US/stripe.lang source_file = htdocs/langs/en_US/stripe.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.supplier_proposal] [o:dolibarr-association:p:dolibarr:r:supplier_proposal]
file_filter = htdocs/langs/<lang>/supplier_proposal.lang file_filter = htdocs/langs/<lang>/supplier_proposal.lang
source_file = htdocs/langs/en_US/supplier_proposal.lang source_file = htdocs/langs/en_US/supplier_proposal.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.suppliers] [o:dolibarr-association:p:dolibarr:r:suppliers]
file_filter = htdocs/langs/<lang>/suppliers.lang file_filter = htdocs/langs/<lang>/suppliers.lang
source_file = htdocs/langs/en_US/suppliers.lang source_file = htdocs/langs/en_US/suppliers.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.ticket] [o:dolibarr-association:p:dolibarr:r:ticket]
file_filter = htdocs/langs/<lang>/ticket.lang file_filter = htdocs/langs/<lang>/ticket.lang
source_file = htdocs/langs/en_US/ticket.lang source_file = htdocs/langs/en_US/ticket.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.trips] [o:dolibarr-association:p:dolibarr:r:trips]
file_filter = htdocs/langs/<lang>/trips.lang file_filter = htdocs/langs/<lang>/trips.lang
source_file = htdocs/langs/en_US/trips.lang source_file = htdocs/langs/en_US/trips.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.users] [o:dolibarr-association:p:dolibarr:r:users]
file_filter = htdocs/langs/<lang>/users.lang file_filter = htdocs/langs/<lang>/users.lang
source_file = htdocs/langs/en_US/users.lang source_file = htdocs/langs/en_US/users.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.website] [o:dolibarr-association:p:dolibarr:r:website]
file_filter = htdocs/langs/<lang>/website.lang file_filter = htdocs/langs/<lang>/website.lang
source_file = htdocs/langs/en_US/website.lang source_file = htdocs/langs/en_US/website.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.withdrawals] [o:dolibarr-association:p:dolibarr:r:withdrawals]
file_filter = htdocs/langs/<lang>/withdrawals.lang file_filter = htdocs/langs/<lang>/withdrawals.lang
source_file = htdocs/langs/en_US/withdrawals.lang source_file = htdocs/langs/en_US/withdrawals.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.workflow] [o:dolibarr-association:p:dolibarr:r:workflow]
file_filter = htdocs/langs/<lang>/workflow.lang file_filter = htdocs/langs/<lang>/workflow.lang
source_file = htdocs/langs/en_US/workflow.lang source_file = htdocs/langs/en_US/workflow.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.zapier] [o:dolibarr-association:p:dolibarr:r:zapier]
file_filter = htdocs/langs/<lang>/zapier.lang file_filter = htdocs/langs/<lang>/zapier.lang
source_file = htdocs/langs/en_US/zapier.lang source_file = htdocs/langs/en_US/zapier.lang
source_lang = en_US source_lang = en_US

View File

@ -245,6 +245,7 @@ if ($action == 'update') {
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_CHECKBOX_LEFT_COLUMN", GETPOST("MAIN_CHECKBOX_LEFT_COLUMN", 'int'), 'chaine', 0, '', $conf->entity);
//dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity); //dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity);
//dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity); //dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
@ -408,6 +409,12 @@ if ($mode == 'other') {
print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeShortList") . '</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '"></td>'; print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeShortList") . '</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '"></td>';
print '</tr>'; print '</tr>';
// Max size of lists
print '<tr class="oddeven"><td>' . $langs->trans("MAIN_CHECKBOX_LEFT_COLUMN") . '</td><td>';
print ajax_constantonoff("MAIN_CHECKBOX_LEFT_COLUMN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
print '</td>';
print '</tr>';
// show input border // show input border
/* /*
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>'; print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';

View File

@ -202,45 +202,53 @@ print '</tr>';
print '<tr>'; print '<tr>';
print '<td class="tdtop nopaddingleftimp">'; print '<td class="tdtop nopaddingleftimp">';
print '<div class="centpercent center"><a id="lnk" href="javascript:hideoptions()"> '.$langs->trans("ShowAdvancedOptions").'...</a></div>'; print '<div class="centpercent center margintoponly marginbottomonly">';
print img_picto('', 'setup', 'class="pictofixedwidth"').'<a id="lnk">'.$langs->trans("ShowAdvancedOptions").'...</a>';
print '</div>';
print '<script type="text/javascript"> print '<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#lnk").click(function() {
console.log("We click on link");
hideoptions(this);
});
});
function hideoptions(){ function hideoptions(domelem) {
const lnk = document.getElementById("lnk");
const div = document.getElementById("div_container_sub_exportoptions"); const div = document.getElementById("div_container_sub_exportoptions");
if (div.style.display === "none") { if (div.style.display === "none") {
div.style.display = "block"; div.style.display = "block";
lnk.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("HideAdvancedoptions")).'"; domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("HideAdvancedoptions")).'";
} else { } else {
div.style.display = "none"; div.style.display = "none";
lnk.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("ShowAdvancedOptions")).'..."; domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("ShowAdvancedOptions")).'...";
} }
} }
</script>'; </script>';
print '<div id="div_container_sub_exportoptions" style="display: none;">'; print '<div id="div_container_sub_exportoptions" style="display: none;">';
print '<br>';
if (in_array($type, array('mysql', 'mysqli'))) { if (in_array($type, array('mysql', 'mysqli'))) {
print "<!-- Fieldset mysqldump -->\n"; print "<!-- Fieldset mysqldump -->\n";
print '<fieldset id="mysql_options"><legend>'.$langs->trans("MySqlExportParameters").'</legend>'; print '<fieldset id="mysql_options">';
print '<div class="formelementrow">'.$langs->trans("FullPathToMysqldumpCommand"); print '<fieldset class="formelementrow"><legend>'.$langs->trans("FullPathToMysqldumpCommand").'</legend>';
if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP)) { if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP)) {
$fullpathofmysqldump = $db->getPathOfDump(); $fullpathofmysqldump = $db->getPathOfDump();
} else { } else {
$fullpathofmysqldump = $conf->global->SYSTEMTOOLS_MYSQLDUMP; $fullpathofmysqldump = $conf->global->SYSTEMTOOLS_MYSQLDUMP;
} }
print '<br>'; print '<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.'">';
print '<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.'" /></div>'; print '</fieldset>';
print '<br>'; print '<br>';
print '<fieldset><legend>'.$langs->trans("ExportOptions").'</legend>'; print '<fieldset><legend>'.$langs->trans("ExportOptions").'</legend>';
if (!empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) { if (!empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) {
print '<div class="formelementrow">'; print '<div class="formelementrow">';
print '<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked />'; print '<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked>';
print '<label for="checkbox_disable_fk">'.$langs->trans("CommandsToDisableForeignKeysForImport").' '.img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')).'</label>'; print '<label for="checkbox_disable_fk">'.$langs->trans("CommandsToDisableForeignKeysForImport").' '.img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')).'</label>';
print '</div>'; print '</div>';
} }
@ -261,7 +269,7 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '<br><br>'; print '<br><br>';
print '<div class="formelementrow">'; print '<div class="formelementrow">';
print '<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" checked="checked" />'; print '<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" checked="checked">';
print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>'; print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>';
print '</div>'; print '</div>';
@ -340,16 +348,19 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '</fieldset>'; print '</fieldset>';
print '</fieldset>'; print '</fieldset>';
// Export mysql bin
print "<!-- Fieldset mysql_nobin -->\n"; print "<!-- Fieldset mysql_nobin -->\n";
print '<fieldset id="mysql_nobin_options">'; print '<fieldset id="mysql_nobin_options">';
print '<legend>'.$langs->trans("MySqlExportParameters").'</legend>';
print '<fieldset>'; print '<fieldset>';
print '<legend>'.$langs->trans("ExportOptions").'</legend>'; print '<legend>'.$langs->trans("ExportOptions").'</legend>';
print '<div class="formelementrow">'; print '<div class="formelementrow">';
print '<input type="checkbox" name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" />'; print '<input type="checkbox" name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" />';
print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>'; print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>';
print '</div>'; print '</div>';
if (!empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) { if (!empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) {
print '<div class="formelementrow">'; print '<div class="formelementrow">';
print '<input type="checkbox" name="nobin_disable_fk" value="yes" id="checkbox_disable_fk" checked />'; print '<input type="checkbox" name="nobin_disable_fk" value="yes" id="checkbox_disable_fk" checked />';
@ -391,16 +402,18 @@ if (in_array($type, array('mysql', 'mysqli'))) {
if (in_array($type, array('pgsql'))) { if (in_array($type, array('pgsql'))) {
print "<!-- Fieldset pg_dump -->\n"; print "<!-- Fieldset pg_dump -->\n";
print '<fieldset id="postgresql_options"><legend>'.$langs->trans("PostgreSqlExportParameters").'</legend>'; print '<fieldset id="postgresql_options">';
print '<div class="formelementrow">'.$langs->trans("FullPathToPostgreSQLdumpCommand");
print '<fieldset class="formelementrow"><legend>'.$langs->trans("FullPathToPostgreSQLdumpCommand").'</legend>';
if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP)) { if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP)) {
$fullpathofpgdump = $db->getPathOfDump(); $fullpathofpgdump = $db->getPathOfDump();
} else { } else {
$fullpathofpgdump = $conf->global->SYSTEMTOOLS_POSTGRESQLDUMP; $fullpathofpgdump = $conf->global->SYSTEMTOOLS_POSTGRESQLDUMP;
} }
print '<br>'; print '<br>';
print '<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.'" /></div>'; print '<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.'" />';
print '</fieldset>';
print '<br>'; print '<br>';
print '<fieldset>'; print '<fieldset>';
@ -446,7 +459,7 @@ print '</table>';
print '<!--<fieldset>'; print '<!--<fieldset>';
print '<legend>'.$langs->trans("Destination").'</legend> -->'; print '<legend>'.$langs->trans("Destination").'</legend> -->';
print '<br>'; print '<br>';
print '<label for="filename_template" class="line-height-large">'.$langs->trans("FileNameToGenerate").'</label>'; print '<label for="filename_template" class="line-height-large opacitymedium">'.$langs->trans("FileNameToGenerate").'</label>';
print '<br>'; print '<br>';
$prefix = 'dump'; $prefix = 'dump';
$ext = '.sql'; $ext = '.sql';
@ -614,7 +627,7 @@ print '<div id="backupfilesleft" class="fichehalfleft">';
print load_fiche_titre($title); print load_fiche_titre($title);
print '<label for="zipfilename_template" class="line-height-large paddingbottom">'.$langs->trans("FileNameToGenerate").'</label><br>'; print '<label for="zipfilename_template" class="line-height-large paddingbottom opacitymedium">'.$langs->trans("FileNameToGenerate").'</label><br>';
$prefix = 'documents'; $prefix = 'documents';
$ext = 'zip'; $ext = 'zip';
$file = $prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.dol_print_date(dol_now('gmt'), "dayhourlogsmall", 'tzuser'); $file = $prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.dol_print_date(dol_now('gmt'), "dayhourlogsmall", 'tzuser');

View File

@ -778,7 +778,7 @@ class Invoices extends DolibarrApi
* *
* @url POST {id}/contacts * @url POST {id}/contacts
* *
* @return array * @return object
* *
* @throws RestException 304 * @throws RestException 304
* @throws RestException 401 * @throws RestException 401

View File

@ -51,7 +51,8 @@ $confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'alpha'); $cancel = GETPOST('cancel', 'alpha');
$toselect = GETPOST('toselect', 'array'); $toselect = GETPOST('toselect', 'array');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'invoicetemplatelist'; // To manage different context of search $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'invoicetemplatelist'; // To manage different context of search
$optioncss = GETPOST('optioncss', 'alpha'); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
$socid = GETPOST('socid', 'int'); $socid = GETPOST('socid', 'int');
@ -66,7 +67,6 @@ $objecttype = 'facture_rec';
if ($action == "create" || $action == "add") { if ($action == "create" || $action == "add") {
$objecttype = ''; $objecttype = '';
} }
$result = restrictedArea($user, 'facture', $id, $objecttype);
$search_ref = GETPOST('search_ref'); $search_ref = GETPOST('search_ref');
$search_societe = GETPOST('search_societe'); $search_societe = GETPOST('search_societe');
@ -101,20 +101,18 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma'); $sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
// If $page is not defined, or '' or -1 or if we click on clear filters
$page = 0; $page = 0;
} // If $page is not defined, or '' or -1 }
$offset = $limit * $page; $offset = $limit * $page;
if (!$sortorder) {
$sortorder = 'DESC';
}
if (!$sortfield) {
$sortfield = 'f.titre';
}
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
// Initialize technical objects
$object = new FactureRec($db); $object = new FactureRec($db);
$extrafields = new ExtraFields($db);
if (($id > 0 || $ref) && $action != 'create' && $action != 'add') { if (($id > 0 || $ref) && $action != 'create' && $action != 'add') {
$ret = $object->fetch($id, $ref); $ret = $object->fetch($id, $ref);
if (!$ret) { if (!$ret) {
@ -124,16 +122,19 @@ if (($id > 0 || $ref) && $action != 'create' && $action != 'add') {
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('invoicereclist')); $hookmanager->initHooks(array('invoicereclist'));
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels // Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element); $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
$permissionnote = $user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php // Default sort order (if not yet defined by previous GETPOST)
$permissiondellink = $user->rights->facture->creer; // Used by the include of actions_dellink.inc.php if (!$sortorder) {
$permissiontoedit = $user->rights->facture->creer; // Used by the include of actions_lineupdonw.inc.php $sortorder = 'DESC';
}
if (!$sortfield) {
$sortfield = 'f.titre';
}
$arrayfields = array( $arrayfields = array(
'f.titre'=>array('label'=>"Ref", 'checked'=>1), 'f.titre'=>array('label'=>"Ref", 'checked'=>1),
@ -169,7 +170,6 @@ if ($socid > 0) {
} }
} }
if ($socid > 0) { if ($socid > 0) {
$tmpthirdparty = new Societe($db); $tmpthirdparty = new Societe($db);
$res = $tmpthirdparty->fetch($socid); $res = $tmpthirdparty->fetch($socid);
@ -180,6 +180,10 @@ if ($socid > 0) {
$objecttype = 'facture_rec'; $objecttype = 'facture_rec';
$permissionnote = $user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->facture->creer; // Used by the include of actions_dellink.inc.php
$permissiontoedit = $user->rights->facture->creer; // Used by the include of actions_lineupdonw.inc.php
$result = restrictedArea($user, 'facture', $object->id, $objecttype); $result = restrictedArea($user, 'facture', $object->id, $objecttype);
@ -202,15 +206,15 @@ if ($reshook < 0) {
} }
if (empty($reshook)) { if (empty($reshook)) {
if (GETPOST('cancel', 'alpha')) { /*if (GETPOST('cancel', 'alpha')) {
$action = ''; $action = '';
} }*/
// Selection of new fields // Selection of new fields
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Do we click on purge search criteria ? // Purge search criteria
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
$search_ref = ''; $search_ref = '';
$search_societe = ''; $search_societe = '';
$search_montant_ht = ''; $search_montant_ht = '';
@ -239,8 +243,13 @@ if (empty($reshook)) {
$search_unit_frequency = ''; $search_unit_frequency = '';
$search_nb_gen_done = ''; $search_nb_gen_done = '';
$search_status = ''; $search_status = '';
$toselect = array();
$search_array_options = array(); $search_array_options = array();
} }
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
|| GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) {
$massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
}
// Mass actions // Mass actions
/*$objectclass='MyObject'; /*$objectclass='MyObject';
@ -256,8 +265,6 @@ if (empty($reshook)) {
* View * View
*/ */
llxHeader('', $langs->trans("RepeatableInvoices"), 'ch-facture.html#s-fac-facture-rec');
$form = new Form($db); $form = new Form($db);
$formother = new FormOther($db); $formother = new FormOther($db);
if (isModEnabled('project')) { if (isModEnabled('project')) {
@ -268,13 +275,17 @@ $invoicerectmp = new FactureRec($db);
$tmpuser = new User($db); $tmpuser = new User($db);
$now = dol_now(); $now = dol_now();
$help_url = '';
$title = $langs->trans("RepeatableInvoices");
$morejs = array();
$morecss = array();
$tmparray = dol_getdate($now); $tmparray = dol_getdate($now);
$today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); // Today is last second of current day $today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); // Today is last second of current day
// Build and execute select
/* // --------------------------------------------------------------------
* List mode
*/
$sql = "SELECT s.nom as name, s.rowid as socid, f.rowid as facid, f.titre as title, f.total_ht, f.total_tva, f.total_ttc, f.frequency, f.unit_frequency,"; $sql = "SELECT s.nom as name, s.rowid as socid, f.rowid as facid, f.titre as title, f.total_ht, f.total_tva, f.total_ttc, f.frequency, f.unit_frequency,";
$sql .= " f.nb_gen_done, f.nb_gen_max, f.date_last_gen, f.date_when, f.suspended,"; $sql .= " f.nb_gen_done, f.nb_gen_max, f.date_last_gen, f.date_when, f.suspended,";
@ -292,11 +303,18 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje
$sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
$sql = preg_replace('/,\s*$/', '', $sql); $sql = preg_replace('/,\s*$/', '', $sql);
$sqlfields = $sql; // $sql fields to remove for count total
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_rec as f"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_rec as f";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_rec_extrafields as ef ON ef.fk_object = f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_rec_extrafields as ef ON ef.fk_object = f.rowid";
if (empty($user->rights->societe->client->voir) && !$socid) { if (empty($user->rights->societe->client->voir) && !$socid) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
} }
// Add table from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " WHERE f.fk_soc = s.rowid";
$sql .= ' AND f.entity IN ('.getEntity('invoice').')'; $sql .= ' AND f.entity IN ('.getEntity('invoice').')';
if (empty($user->rights->societe->client->voir) && !$socid) { if (empty($user->rights->societe->client->voir) && !$socid) {
@ -366,215 +384,284 @@ if ($search_date_when_end) {
$sql .= " AND f.date_when <= '".$db->idate($search_date_when_end)."'"; $sql .= " AND f.date_when <= '".$db->idate($search_date_when_end)."'";
} }
$tmpsortfield = $sortfield; // Count total nb of records
if ($tmpsortfield == 'recurring') {
$tmpsortfield = 'f.frequency';
}
$sql .= $db->order($tmpsortfield, $sortorder);
$nbtotalofrecords = ''; $nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$result = $db->query($sql); /* The fast and low memory method to get and count full list converts the sql into a sql count */
$nbtotalofrecords = $db->num_rows($result); $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
$resql = $db->query($sqlforcount);
if ($resql) {
$objforcount = $db->fetch_object($resql);
$nbtotalofrecords = $objforcount->nbtotalofrecords;
} else {
dol_print_error($db);
}
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0; $page = 0;
$offset = 0; $offset = 0;
} }
$db->free($resql);
} }
$sql .= $db->plimit($limit + 1, $offset); $tmpsortfield = $sortfield;
if ($tmpsortfield == 'recurring') {
$tmpsortfield = 'f.frequency';
}
// Complete request and execute it with limit
$sql .= $db->order($tmpsortfield, $sortorder);
if ($limit) {
$sql .= $db->plimit($limit + 1, $offset);
}
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) { if (!$resql) {
$num = $db->num_rows($resql); dol_print_error($db);
exit;
}
$param = ''; $num = $db->num_rows($resql);
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
// Output page
// --------------------------------------------------------------------
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
$arrayofselected = is_array($toselect) ? $toselect : array();
$param = '';
if (!empty($mode)) {
$param .= '&mode='.urlencode($mode);
}
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage); $param .= '&contextpage='.urlencode($contextpage);
} }
if ($limit > 0 && $limit != $conf->liste_limit) { if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.urlencode($limit); $param .= '&limit='.urlencode($limit);
} }
if ($socid > 0) { if ($socid > 0) {
$param .= '&socid='.urlencode($socid); $param .= '&socid='.urlencode($socid);
} }
if ($search_date_startday) { if ($search_date_startday) {
$param .= '&search_date_startday='.urlencode($search_date_startday); $param .= '&search_date_startday='.urlencode($search_date_startday);
} }
if ($search_date_startmonth) { if ($search_date_startmonth) {
$param .= '&search_date_startmonth='.urlencode($search_date_startmonth); $param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
} }
if ($search_date_startyear) { if ($search_date_startyear) {
$param .= '&search_date_startyear='.urlencode($search_date_startyear); $param .= '&search_date_startyear='.urlencode($search_date_startyear);
} }
if ($search_date_endday) { if ($search_date_endday) {
$param .= '&search_date_endday='.urlencode($search_date_endday); $param .= '&search_date_endday='.urlencode($search_date_endday);
} }
if ($search_date_endmonth) { if ($search_date_endmonth) {
$param .= '&search_date_endmonth='.urlencode($search_date_endmonth); $param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
} }
if ($search_date_endyear) { if ($search_date_endyear) {
$param .= '&search_date_endyear='.urlencode($search_date_endyear); $param .= '&search_date_endyear='.urlencode($search_date_endyear);
} }
if ($search_date_when_startday) { if ($search_date_when_startday) {
$param .= '&search_date_when_startday='.urlencode($search_date_when_startday); $param .= '&search_date_when_startday='.urlencode($search_date_when_startday);
} }
if ($search_date_when_startmonth) { if ($search_date_when_startmonth) {
$param .= '&search_date_when_startmonth='.urlencode($search_date_when_startmonth); $param .= '&search_date_when_startmonth='.urlencode($search_date_when_startmonth);
} }
if ($search_date_when_startyear) { if ($search_date_when_startyear) {
$param .= '&search_date_when_startyear='.urlencode($search_date_when_startyear); $param .= '&search_date_when_startyear='.urlencode($search_date_when_startyear);
} }
if ($search_date_when_endday) { if ($search_date_when_endday) {
$param .= '&search_date_when_endday='.urlencode($search_date_when_endday); $param .= '&search_date_when_endday='.urlencode($search_date_when_endday);
} }
if ($search_date_when_endmonth) { if ($search_date_when_endmonth) {
$param .= '&search_date_when_endmonth='.urlencode($search_date_when_endmonth); $param .= '&search_date_when_endmonth='.urlencode($search_date_when_endmonth);
} }
if ($search_date_when_endyear) { if ($search_date_when_endyear) {
$param .= '&search_date_when_endyear='.urlencode($search_date_when_endyear); $param .= '&search_date_when_endyear='.urlencode($search_date_when_endyear);
} }
if ($search_ref) { if ($search_ref) {
$param .= '&search_ref='.urlencode($search_ref); $param .= '&search_ref='.urlencode($search_ref);
} }
if ($search_societe) { if ($search_societe) {
$param .= '&search_societe='.urlencode($search_societe); $param .= '&search_societe='.urlencode($search_societe);
} }
if ($search_montant_ht != '') { if ($search_montant_ht != '') {
$param .= '&search_montant_ht='.urlencode($search_montant_ht); $param .= '&search_montant_ht='.urlencode($search_montant_ht);
} }
if ($search_montant_vat != '') { if ($search_montant_vat != '') {
$param .= '&search_montant_vat='.urlencode($search_montant_vat); $param .= '&search_montant_vat='.urlencode($search_montant_vat);
} }
if ($search_montant_ttc != '') { if ($search_montant_ttc != '') {
$param .= '&search_montant_ttc='.urlencode($search_montant_ttc); $param .= '&search_montant_ttc='.urlencode($search_montant_ttc);
} }
if ($search_payment_mode != '') { if ($search_payment_mode != '') {
$param .= '&search_payment_mode='.urlencode($search_payment_mode); $param .= '&search_payment_mode='.urlencode($search_payment_mode);
} }
if ($search_payment_term != '') { if ($search_payment_term != '') {
$param .= '&search_payment_term='.urlencode($search_payment_term); $param .= '&search_payment_term='.urlencode($search_payment_term);
} }
if ($search_recurring != '' && $search_recurring != '-1') { if ($search_recurring != '' && $search_recurring != '-1') {
$param .= '&search_recurring='.urlencode($search_recurring); $param .= '&search_recurring='.urlencode($search_recurring);
} }
if ($search_frequency > 0) { if ($search_frequency > 0) {
$param .= '&search_frequency='.urlencode($search_frequency); $param .= '&search_frequency='.urlencode($search_frequency);
} }
if ($search_unit_frequency != '') { if ($search_unit_frequency != '') {
$param .= '&search_unit_frequency='.urlencode($search_unit_frequency); $param .= '&search_unit_frequency='.urlencode($search_unit_frequency);
} }
if ($search_nb_gen_done != '') { if ($search_nb_gen_done != '') {
$param .= '&search_nb_gen_done='.urlencode($search_nb_gen_done); $param .= '&search_nb_gen_done='.urlencode($search_nb_gen_done);
} }
if ($search_status != '') { if ($search_status != '') {
$param .= '&search_status='.urlencode($search_status); $param .= '&search_status='.urlencode($search_status);
} }
if ($optioncss != '') { if ($optioncss != '') {
$param .= '&optioncss='.urlencode($optioncss); $param .= '&optioncss='.urlencode($optioncss);
} }
// Add $param from extra fields // Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// Add $param from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
$param .= $hookmanager->resPrint;
$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); // List of mass actions available
$arrayofmassactions = array(
//'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
//'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
);
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
//$selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
if ($optioncss != '') { $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
//$selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
if ($optioncss != '') {
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
} }
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">'; print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="search_status" value="'.$search_status.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="page_y" value="">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
$title = $langs->trans("RepeatableInvoices");
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1);
print '<span class="opacitymedium">'.$langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).'</span><br><br>'; print '<span class="opacitymedium">'.$langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).'</span><br><br>';
$i = 0; $i = 0;
$moreforfilter = ''; $moreforfilter = '';
print '<div class="div-table-responsive">'; $parameters = array();
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
$moreforfilter .= $hookmanager->resPrint;
} else {
$moreforfilter = $hookmanager->resPrint;
}
// Filters lines if (!empty($moreforfilter)) {
print '<tr class="liste_titre_filter">'; print '<div class="liste_titre liste_titre_bydiv centpercent">';
// Ref print $moreforfilter;
if (!empty($arrayfields['f.titre']['checked'])) { print '</div>';
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
// Fields title search
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch center">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Ref
if (!empty($arrayfields['f.titre']['checked'])) {
print '<td class="liste_titre left">'; print '<td class="liste_titre left">';
print '<input class="flat maxwidth100" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '<input class="flat maxwidth100" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>'; print '</td>';
} }
// Thirdparty // Thirdparty
if (!empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['s.nom']['checked'])) {
print '<td class="liste_titre left"><input class="flat" type="text" size="8" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>'; print '<td class="liste_titre left"><input class="flat" type="text" size="8" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>';
} }
if (!empty($arrayfields['f.total_ht']['checked'])) { if (!empty($arrayfields['f.total_ht']['checked'])) {
// Amount net // Amount net
print '<td class="liste_titre right">'; print '<td class="liste_titre right">';
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">'; print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['f.total_tva']['checked'])) { if (!empty($arrayfields['f.total_tva']['checked'])) {
// Amount Vat // Amount Vat
print '<td class="liste_titre right">'; print '<td class="liste_titre right">';
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">'; print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['f.total_ttc']['checked'])) { if (!empty($arrayfields['f.total_ttc']['checked'])) {
// Amount // Amount
print '<td class="liste_titre right">'; print '<td class="liste_titre right">';
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">'; print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
// Payment term // Payment term
print '<td class="liste_titre right">'; print '<td class="liste_titre right">';
print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100'); print $form->getSelectConditionsPaiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100');
print "</td>"; print "</td>";
} }
if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) {
// Payment mode // Payment mode
print '<td class="liste_titre right">'; print '<td class="liste_titre right">';
print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100', 1); print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100', 1);
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['recurring']['checked'])) { if (!empty($arrayfields['recurring']['checked'])) {
// Recurring or not // Recurring or not
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print $form->selectyesno('search_recurring', $search_recurring, 1, false, 1); print $form->selectyesno('search_recurring', $search_recurring, 1, false, 1);
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['f.frequency']['checked'])) { if (!empty($arrayfields['f.frequency']['checked'])) {
// Recurring or not // Recurring or not
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<input class="flat" type="text" size="1" name="search_frequency" value="'.dol_escape_htmltag($search_frequency).'">'; print '<input class="flat" type="text" size="1" name="search_frequency" value="'.dol_escape_htmltag($search_frequency).'">';
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['f.unit_frequency']['checked'])) { if (!empty($arrayfields['f.unit_frequency']['checked'])) {
// Frequency unit // Frequency unit
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<input class="flat" type="text" size="1" name="search_unit_frequency" value="'.dol_escape_htmltag($search_unit_frequency).'">'; print '<input class="flat" type="text" size="1" name="search_unit_frequency" value="'.dol_escape_htmltag($search_unit_frequency).'">';
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['f.nb_gen_done']['checked'])) { if (!empty($arrayfields['f.nb_gen_done']['checked'])) {
// Nb generation // Nb generation
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre" align="center">';
print '<input class="flat" type="text" size="1" name="search_nb_gen_done" value="'.dol_escape_htmltag($search_nb_gen_done).'">'; print '<input class="flat" type="text" size="1" name="search_nb_gen_done" value="'.dol_escape_htmltag($search_nb_gen_done).'">';
print '</td>'; print '</td>';
} }
// Date invoice // Date invoice
if (!empty($arrayfields['f.date_last_gen']['checked'])) { if (!empty($arrayfields['f.date_last_gen']['checked'])) {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<div class="nowrap">'; print '<div class="nowrap">';
print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
@ -583,9 +670,9 @@ if ($resql) {
print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print '</div>'; print '</div>';
print '</td>'; print '</td>';
} }
// Date next generation // Date next generation
if (!empty($arrayfields['f.date_when']['checked'])) { if (!empty($arrayfields['f.date_when']['checked'])) {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<div class="nowrap">'; print '<div class="nowrap">';
print $form->selectDate($search_date_when_start ? $search_date_when_start : -1, 'search_date_when_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print $form->selectDate($search_date_when_start ? $search_date_when_start : -1, 'search_date_when_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
@ -594,36 +681,36 @@ if ($resql) {
print $form->selectDate($search_date_when_end ? $search_date_when_end : -1, 'search_date_when_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print $form->selectDate($search_date_when_end ? $search_date_when_end : -1, 'search_date_when_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print '</div>'; print '</div>';
print '</td>'; print '</td>';
} }
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook // Fields from hook
$parameters = array('arrayfields'=>$arrayfields); $parameters = array('arrayfields'=>$arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
// User creation // User creation
if (!empty($arrayfields['f.fk_user_author']['checked'])) { if (!empty($arrayfields['f.fk_user_author']['checked'])) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '</td>'; print '</td>';
} }
// User modification // User modification
if (!empty($arrayfields['f.fk_user_modif']['checked'])) { if (!empty($arrayfields['f.fk_user_modif']['checked'])) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '</td>'; print '</td>';
} }
// Date creation // Date creation
if (!empty($arrayfields['f.datec']['checked'])) { if (!empty($arrayfields['f.datec']['checked'])) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '</td>'; print '</td>';
} }
// Date modification // Date modification
if (!empty($arrayfields['f.tms']['checked'])) { if (!empty($arrayfields['f.tms']['checked'])) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '</td>'; print '</td>';
} }
// Status // Status
if (!empty($arrayfields['status']['checked'])) { if (!empty($arrayfields['status']['checked'])) {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
$liststatus = array( $liststatus = array(
0=>$langs->trans("Draft"), 0=>$langs->trans("Draft"),
@ -632,82 +719,97 @@ if ($resql) {
); );
print $form->selectarray('search_status', $liststatus, $search_status, -2, 0, 0, '', 0, 0, 0, '', 'width100 onrightofpage'); print $form->selectarray('search_status', $liststatus, $search_status, -2, 0, 0, '', 0, 0, 0, '', 'width100 onrightofpage');
print '</td>'; print '</td>';
} }
// Action column // Action column
print '<td class="liste_titre" align="middle">'; if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch center">';
$searchpicto = $form->showFilterButtons(); $searchpicto = $form->showFilterButtons();
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
print "</tr>\n"; }
print '</tr>'."\n";
print '<tr class="liste_titre">'; $totalarray = array();
if (!empty($arrayfields['f.titre']['checked'])) { $totalarray['nbfield'] = 0;
// Fields title label
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
}
if (!empty($arrayfields['f.titre']['checked'])) {
print_liste_field_titre($arrayfields['f.titre']['label'], $_SERVER['PHP_SELF'], "f.titre", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.titre']['label'], $_SERVER['PHP_SELF'], "f.titre", "", $param, "", $sortfield, $sortorder);
} }
if (!empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['s.nom']['checked'])) {
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], "s.nom", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], "s.nom", "", $param, "", $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.total_ht']['checked'])) { if (!empty($arrayfields['f.total_ht']['checked'])) {
print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], "f.total_ht", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], "f.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.total_tva']['checked'])) { if (!empty($arrayfields['f.total_tva']['checked'])) {
print_liste_field_titre($arrayfields['f.total_tva']['label'], $_SERVER['PHP_SELF'], "f.total_tva", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.total_tva']['label'], $_SERVER['PHP_SELF'], "f.total_tva", "", $param, 'class="right"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.total_ttc']['checked'])) { if (!empty($arrayfields['f.total_ttc']['checked'])) {
print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
print_liste_field_titre($arrayfields['f.fk_cond_reglement']['label'], $_SERVER['PHP_SELF'], "f.fk_cond_reglement", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.fk_cond_reglement']['label'], $_SERVER['PHP_SELF'], "f.fk_cond_reglement", "", $param, '', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) {
print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER['PHP_SELF'], "f.fk_mode_reglement", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER['PHP_SELF'], "f.fk_mode_reglement", "", $param, '', $sortfield, $sortorder);
} }
if (!empty($arrayfields['recurring']['checked'])) { if (!empty($arrayfields['recurring']['checked'])) {
print_liste_field_titre($arrayfields['recurring']['label'], $_SERVER['PHP_SELF'], "recurring", "", $param, 'class="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['recurring']['label'], $_SERVER['PHP_SELF'], "recurring", "", $param, 'class="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.frequency']['checked'])) { if (!empty($arrayfields['f.frequency']['checked'])) {
print_liste_field_titre($arrayfields['f.frequency']['label'], $_SERVER['PHP_SELF'], "f.frequency", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.frequency']['label'], $_SERVER['PHP_SELF'], "f.frequency", "", $param, 'align="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.unit_frequency']['checked'])) { if (!empty($arrayfields['f.unit_frequency']['checked'])) {
print_liste_field_titre($arrayfields['f.unit_frequency']['label'], $_SERVER['PHP_SELF'], "f.unit_frequency", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.unit_frequency']['label'], $_SERVER['PHP_SELF'], "f.unit_frequency", "", $param, 'align="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.nb_gen_done']['checked'])) { if (!empty($arrayfields['f.nb_gen_done']['checked'])) {
print_liste_field_titre($arrayfields['f.nb_gen_done']['label'], $_SERVER['PHP_SELF'], "f.nb_gen_done", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.nb_gen_done']['label'], $_SERVER['PHP_SELF'], "f.nb_gen_done", "", $param, 'align="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.date_last_gen']['checked'])) { if (!empty($arrayfields['f.date_last_gen']['checked'])) {
print_liste_field_titre($arrayfields['f.date_last_gen']['label'], $_SERVER['PHP_SELF'], "f.date_last_gen", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.date_last_gen']['label'], $_SERVER['PHP_SELF'], "f.date_last_gen", "", $param, 'align="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.date_when']['checked'])) { if (!empty($arrayfields['f.date_when']['checked'])) {
print_liste_field_titre($arrayfields['f.date_when']['label'], $_SERVER['PHP_SELF'], "f.date_when", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.date_when']['label'], $_SERVER['PHP_SELF'], "f.date_when", "", $param, 'align="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.fk_user_author']['checked'])) { if (!empty($arrayfields['f.fk_user_author']['checked'])) {
print_liste_field_titre($arrayfields['f.fk_user_author']['label'], $_SERVER['PHP_SELF'], "f.fk_user_author", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.fk_user_author']['label'], $_SERVER['PHP_SELF'], "f.fk_user_author", "", $param, 'align="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.fk_user_modif']['checked'])) { if (!empty($arrayfields['f.fk_user_modif']['checked'])) {
print_liste_field_titre($arrayfields['f.fk_user_modif']['label'], $_SERVER['PHP_SELF'], "f.fk_user_modif", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.fk_user_modif']['label'], $_SERVER['PHP_SELF'], "f.fk_user_modif", "", $param, 'align="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.datec']['checked'])) { if (!empty($arrayfields['f.datec']['checked'])) {
print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER['PHP_SELF'], "f.datec", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER['PHP_SELF'], "f.datec", "", $param, 'align="center"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['f.tms']['checked'])) { if (!empty($arrayfields['f.tms']['checked'])) {
print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER['PHP_SELF'], "f.tms", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER['PHP_SELF'], "f.tms", "", $param, 'align="center"', $sortfield, $sortorder);
} }
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
if (!empty($arrayfields['status']['checked'])) { if (!empty($arrayfields['status']['checked'])) {
print_liste_field_titre($arrayfields['status']['label'], $_SERVER['PHP_SELF'], "f.suspended,f.frequency", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['status']['label'], $_SERVER['PHP_SELF'], "f.suspended,f.frequency", "", $param, 'align="center"', $sortfield, $sortorder);
} }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'center maxwidthsearch '); // Action column
print "</tr>\n"; if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
}
$totalarray['nbfield']++; // For the column action
print '</tr>'."\n";
if ($num > 0) {
$i = 0; $i = 0;
$savnbfield = $totalarray['nbfield'];
$totalarray = array(); $totalarray = array();
$totalarray['nbfield'] = 0; $totalarray['nbfield'] = 0;
$totalarray['val']['f.total_ht'] = 0; $totalarray['val']['f.total_ht'] = 0;
$totalarray['val']['f.total_tva'] = 0; $totalarray['val']['f.total_tva'] = 0;
$totalarray['val']['f.total_ttc'] = 0; $totalarray['val']['f.total_ttc'] = 0;
while ($i < min($num, $limit)) { $imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
if (empty($objp)) { if (empty($objp)) {
break; break;
@ -727,8 +829,28 @@ if ($resql) {
$invoicerectmp->total_tva = $objp->total_tva; $invoicerectmp->total_tva = $objp->total_tva;
$invoicerectmp->total_ttc = $objp->total_ttc; $invoicerectmp->total_ttc = $objp->total_ttc;
print '<tr class="oddeven">'; // Show here line of result
$j = 0;
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($user->rights->facture->creer && empty($invoicerectmp->suspended)) {
if ($invoicerectmp->isMaxNbGenReached()) {
print $langs->trans("MaxNumberOfGenerationReached");
} elseif (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&amp;socid='.$objp->socid.'&amp;fac_rec='.$objp->facid.'">';
print img_picto($langs->trans("CreateBill"), 'add', 'class="paddingrightonly"');
print $langs->trans("CreateBill").'</a>';
} else {
print $form->textwithpicto('', $langs->trans("DateIsNotEnough"));
}
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields['f.titre']['checked'])) { if (!empty($arrayfields['f.titre']['checked'])) {
print '<td class="nowrap tdoverflowmax200">'; print '<td class="nowrap tdoverflowmax200">';
print $invoicerectmp->getNomUrl(1); print $invoicerectmp->getNomUrl(1);
@ -888,7 +1010,7 @@ if ($resql) {
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook // Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray); $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
// Status // Status
@ -901,7 +1023,8 @@ if ($resql) {
} }
} }
// Action column // Action column
print '<td class="center tdoverflowmax125">'; if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center tdoverflowmax125">';
if ($user->rights->facture->creer && empty($invoicerectmp->suspended)) { if ($user->rights->facture->creer && empty($invoicerectmp->suspended)) {
if ($invoicerectmp->isMaxNbGenReached()) { if ($invoicerectmp->isMaxNbGenReached()) {
print $langs->trans("MaxNumberOfGenerationReached"); print $langs->trans("MaxNumberOfGenerationReached");
@ -912,41 +1035,45 @@ if ($resql) {
} else { } else {
print $form->textwithpicto('', $langs->trans("DateIsNotEnough")); print $form->textwithpicto('', $langs->trans("DateIsNotEnough"));
} }
} else {
print "&nbsp;";
} }
print '</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
print "</td>"; }
print "</tr>\n"; print '</tr>'."\n";
$i++; $i++;
} }
} else {
// Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
// If no record found
if ($num == 0) {
$colspan = 1; $colspan = 1;
foreach ($arrayfields as $key => $val) { foreach ($arrayfields as $key => $val) {
if (!empty($val['checked'])) { if (!empty($val['checked'])) {
$colspan++; $colspan++;
} }
} }
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
}
// Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
print "</table>";
print "</div>";
print "</form>";
$db->free($resql);
} else {
dol_print_error($db);
} }
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'."\n";
print '</div>'."\n";
print '</form>'."\n";
// End of page // End of page
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -48,7 +48,6 @@ $element = GETPOST('element', 'alpha');
$upload_handler = new FileUpload(null, $fk_element, $element); $upload_handler = new FileUpload(null, $fk_element, $element);
/* /*
* View * View
*/ */

View File

@ -935,7 +935,7 @@ class dolReceiptPrinter extends Printer
* Function Init Printer * Function Init Printer
* *
* @param int $printerid Printer id * @param int $printerid Printer id
* @return int 0 if OK; >0 if KO * @return void|int 0 if OK; >0 if KO
*/ */
public function initPrinter($printerid) public function initPrinter($printerid)
{ {

View File

@ -484,7 +484,7 @@ class FileUpload
/** /**
* Output data * Output data
* *
* @return void * @return string|void
*/ */
public function post() public function post()
{ {

View File

@ -77,7 +77,7 @@ class HookManager
* Then when a hook executeHooks('aMethod'...) is called, the method aMethod found into class will be executed. * Then when a hook executeHooks('aMethod'...) is called, the method aMethod found into class will be executed.
* *
* @param string[] $arraycontext Array list of searched hooks tab/features. For example: 'thirdpartycard' (for hook methods into page card thirdparty), 'thirdpartydao' (for hook methods into Societe), ... * @param string[] $arraycontext Array list of searched hooks tab/features. For example: 'thirdpartycard' (for hook methods into page card thirdparty), 'thirdpartydao' (for hook methods into Societe), ...
* @return int Always 1 * @return int|void Always 1
*/ */
public function initHooks($arraycontext) public function initHooks($arraycontext)
{ {

View File

@ -9784,7 +9784,7 @@ class Form
/** /**
* Return HTML to show the search and clear seach button * Return HTML to show the search and clear seach button
* *
* @param string $pos position colon on liste value left or right * @param string $pos Position of colon on the list. Value 'left' or 'right'
* @return string * @return string
*/ */
public function showFilterButtons($pos = '') public function showFilterButtons($pos = '')

View File

@ -952,6 +952,7 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options
} }
break; break;
case 'restricthtml': // Recommended for most html textarea case 'restricthtml': // Recommended for most html textarea
case 'restricthtmlnolink':
case 'restricthtmlallowunvalid': case 'restricthtmlallowunvalid':
$out = dol_htmlwithnojs($out, 1, $check); $out = dol_htmlwithnojs($out, 1, $check);
break; break;
@ -7201,7 +7202,7 @@ function dol_nl2br($stringtoencode, $nl2brmode = 0, $forxml = false)
* *
* @param string $stringtoencode String to encode * @param string $stringtoencode String to encode
* @param int $nouseofiframesandbox Allow use of option MAIN_SECURITY_USE_SANDBOX_FOR_HTMLWITHNOJS for html sanitizing * @param int $nouseofiframesandbox Allow use of option MAIN_SECURITY_USE_SANDBOX_FOR_HTMLWITHNOJS for html sanitizing
* @param string $check 'restricthtml' or 'restricthtmlallowunvalid' * @param string $check 'restricthtmlnolink' or 'restricthtml' or 'restricthtmlallowunvalid'
* @return string HTML sanitized * @return string HTML sanitized
*/ */
function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = 'restricthtml') function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = 'restricthtml')
@ -7274,9 +7275,16 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
// Check the limit of external links in a Rich text content. We count '<img' and 'url(' // Check the limit of external links in a Rich text content. We count '<img' and 'url('
$reg = array(); $reg = array();
preg_match_all('/(<img|url\()/i', $out, $reg); preg_match_all('/(<img|url\()/i', $out, $reg);
if (count($reg[0]) > getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", 1000)) { $nbextlink = count($reg[0]);
if ($nbextlink > getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", 1000)) {
$out = 'TooManyLinksIntoHTMLString'; $out = 'TooManyLinksIntoHTMLString';
} }
//
if (!empty($conf->global->MAIN_DISALLOW_EXT_URL_INTO_DESCRIPTIONS) || $check == 'restricthtmlnolink') {
if ($nbextlink > 0) {
$out = 'ExternalLinksNotAllowed';
}
}
return $out; return $out;
} }

View File

@ -916,7 +916,7 @@ class pdf_standard_asset extends ModelePDFAsset
* @param int $showaddress 0=no, 1=yes * @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param Translate $outputlangsbis Object lang for output bis * @param Translate $outputlangsbis Object lang for output bis
* @return void * @return float
*/ */
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
{ {

View File

@ -478,7 +478,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param CompanyBankAccount $object Object to show * @param CompanyBankAccount $object Object to show
* @param int $posy Y * @param int $posy Y
* @param Translate $outputlangs Langs object * @param Translate $outputlangs Langs object
* @return void * @return float
*/ */
protected function _tableau_info(&$pdf, $object, $posy, $outputlangs) protected function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{ {

View File

@ -401,7 +401,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param Object $object Object to show * @param Object $object Object to show
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text * @param int $hidefreetext 1=Hide free text
* @return void * @return mixed
*/ */
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{ {

View File

@ -2057,7 +2057,7 @@ class pdf_sponge extends ModelePDFFactures
* @param int $showaddress 0=no, 1=yes (usually set to 1 for first page, and 0 for next pages) * @param int $showaddress 0=no, 1=yes (usually set to 1 for first page, and 0 for next pages)
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param Translate $outputlangsbis Object lang for output bis * @param Translate $outputlangsbis Object lang for output bis
* @return int top shift of linked object lines * @return array top shift of linked object lines
*/ */
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
{ {

View File

@ -238,7 +238,7 @@ class ImportCsv extends ModeleImports
/** /**
* Return array of next record in input file. * Return array of next record in input file.
* *
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string) * @return array|boolean Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
*/ */
public function import_read_record() public function import_read_record()
{ {

View File

@ -304,7 +304,7 @@ class ImportXlsx extends ModeleImports
/** /**
* Return array of next record in input file. * Return array of next record in input file.
* *
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string) * @return array|boolean Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
*/ */
public function import_read_record() public function import_read_record()
{ {

View File

@ -1067,7 +1067,7 @@ class pdf_vinci extends ModelePDFMo
* @param CommandeFournisseur $object Object to show * @param CommandeFournisseur $object Object to show
* @param int $showaddress 0=no, 1=yes * @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @return void * @return float|int
*/ */
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {

View File

@ -191,7 +191,7 @@ abstract class ModeleProductCode
* *
* @param DoliDB $dbs Database handler * @param DoliDB $dbs Database handler
* @param integer $maxfilenamelength Max length of value to show * @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers * @return array|int List of numbers
*/ */
public static function liste_modeles($dbs, $maxfilenamelength = 0) public static function liste_modeles($dbs, $maxfilenamelength = 0)
{ {

View File

@ -1484,7 +1484,7 @@ class pdf_azur extends ModelePDFPropales
* @param int $showaddress 0=no, 1=yes * @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param Translate $outputlangsbis Object lang for output bis * @param Translate $outputlangsbis Object lang for output bis
* @return void * @return int|float
*/ */
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
{ {

View File

@ -1547,7 +1547,7 @@ class pdf_cyan extends ModelePDFPropales
* @param int $showaddress 0=no, 1=yes * @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param Translate $outputlangsbis Object lang for output bis * @param Translate $outputlangsbis Object lang for output bis
* @return void * @return float|int
*/ */
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
{ {

View File

@ -1223,7 +1223,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
* @param CommandeFournisseur $object Object to show * @param CommandeFournisseur $object Object to show
* @param int $showaddress 0=no, 1=yes * @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @return void * @return float|int
*/ */
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {

View File

@ -1130,7 +1130,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* @param CommandeFournisseur $object Object to show * @param CommandeFournisseur $object Object to show
* @param int $showaddress 0=no, 1=yes * @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @return void * @return float|int
*/ */
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {

View File

@ -1232,7 +1232,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @param Object $object Object to show * @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes * @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @return void * @return float|int
*/ */
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {

View File

@ -535,7 +535,7 @@ class PaiementFourn extends Paiement
* Return list of supplier invoices the payment point to * Return list of supplier invoices the payment point to
* *
* @param string $filter SQL filter. Warning: This value must not come from a user input. * @param string $filter SQL filter. Warning: This value must not come from a user input.
* @return array Array of supplier invoice id * @return array|int Array of supplier invoice id | <0 si ko
*/ */
public function getBillsArray($filter = '') public function getBillsArray($filter = '')
{ {

View File

@ -2372,3 +2372,4 @@ WarningModuleHasChangedLastVersionCheckParameter=Warning: the module %s has set
WarningModuleHasChangedSecurityCsrfParameter=Warning: the module %s has disabled the CSRF security of your instance. This action is suspect and your installation may no more be secured. Please contact the author of the module for explanation. WarningModuleHasChangedSecurityCsrfParameter=Warning: the module %s has disabled the CSRF security of your instance. This action is suspect and your installation may no more be secured. Please contact the author of the module for explanation.
EMailsInGoingDesc=Incoming emails are managed by the module %s. You must enable and configure it if you need to support ingoing emails. EMailsInGoingDesc=Incoming emails are managed by the module %s. You must enable and configure it if you need to support ingoing emails.
MAIN_IMAP_USE_PHPIMAP=Use the PHP-IMAP library for IMAP instead of native PHP IMAP. This also allows the use of an OAuth2 connection for IMAP (module OAuth must also be activated). MAIN_IMAP_USE_PHPIMAP=Use the PHP-IMAP library for IMAP instead of native PHP IMAP. This also allows the use of an OAuth2 connection for IMAP (module OAuth must also be activated).
MAIN_CHECKBOX_LEFT_COLUMN=Show the column for field and line selection on the left (on the right by default)

View File

@ -1223,5 +1223,6 @@ AddToContacts=Add address to my contacts
LastAccess=Last access LastAccess=Last access
UploadAnImageToSeeAPhotoHere=Upload an image from the tab %s to see a photo here UploadAnImageToSeeAPhotoHere=Upload an image from the tab %s to see a photo here
LastPasswordChangeDate=Last password change date LastPasswordChangeDate=Last password change date
PublicVirtualCardUrl=Virtual business card page PublicVirtualCardUrl=Virtual business card page URL
PublicVirtualCard=Virtual business card
TreeView=Tree view TreeView=Tree view

View File

@ -229,7 +229,7 @@ class Projects extends DolibarrApi
* *
* @param int $id Id of project * @param int $id Id of project
* @param int $includetimespent 0=Return only list of tasks. 1=Include a summary of time spent, 2=Include details of time spent lines * @param int $includetimespent 0=Return only list of tasks. 1=Include a summary of time spent, 2=Include details of time spent lines
* @return int * @return array
* *
* @url GET {id}/tasks * @url GET {id}/tasks
*/ */

View File

@ -205,7 +205,7 @@ $arrayofjs = array();
$arrayofcss = array(); $arrayofcss = array();
$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>'; $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
llxHeader($head, $langs->trans("UserProfile").' '.$object->getFullName($langs), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1, 1); llxHeader($head, $object->getFullName($langs).' - '.$langs->trans("PublicVirtualCard"), '', '', 0, 0, '', '', '', 'onlinepaymentbody'.(GETPOST('mode')=='preview' ? ' scalepreview nopointervent' : ''), $replacemainarea, 1, 1);
print '<span id="dolpaymentspan"></span>'."\n"; print '<span id="dolpaymentspan"></span>'."\n";
print '<div class="center">'."\n"; print '<div class="center">'."\n";

View File

@ -7538,6 +7538,33 @@ div.clipboardCPValue.hidewithsize {
} }
/* ============================================================================== */
/* Virtual business card */
/* ============================================================================== */
.virtualcard-div {
overflow: hidden;
vertical-align: top;
/* background: #aaa; */
}
#virtualcard-iframe {
border: 40px solid #aaa;
vertical-align: top;
width: 10%;
min-width: 100px;
border-radius: 10px;
aspect-ratio: 0.6;
}
.nopointervent {
pointer-events: none;
}
.scalepreview {
/* transform: scale(0.5); */
zoom: 0.20;
/* filter: blur(4px); */
}
/* ============================================================================== */ /* ============================================================================== */
/* CSS style used for small screen */ /* CSS style used for small screen */

View File

@ -7440,6 +7440,33 @@ div.clipboardCPValue.hidewithsize {
} }
/* ============================================================================== */
/* Virtual business card */
/* ============================================================================== */
.virtualcard-div {
overflow: hidden;
vertical-align: top;
/* background: #aaa; */
}
#virtualcard-iframe {
border: 40px solid #aaa;
vertical-align: top;
width: 10%;
min-width: 100px;
border-radius: 10px;
aspect-ratio: 0.6;
}
.nopointervent {
pointer-events: none;
}
.scalepreview {
/* transform: scale(0.5); */
zoom: 0.20;
}
/* ============================================================================== */ /* ============================================================================== */
/* CSS style used for small screen */ /* CSS style used for small screen */
/* ============================================================================== */ /* ============================================================================== */

View File

@ -593,7 +593,7 @@ class Users extends DolibarrApi
* *
* @param int $group ID of group * @param int $group ID of group
* @param int $load_members Load members list or not {@min 0} {@max 1} * @param int $load_members Load members list or not {@min 0} {@max 1}
* @return array Array of User objects * @return object object of User objects
* *
* @throws RestException 401 Not allowed * @throws RestException 401 Not allowed
* @throws RestException 404 User not found * @throws RestException 404 User not found

View File

@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
// Load translation files required by page // Load translation files required by page
$langs->loadLangs(array("users", "companies")); $langs->loadLangs(array("users", "companies", "admin", "website"));
// Security check // Security check
$id = GETPOST('id', 'int'); $id = GETPOST('id', 'int');
@ -129,14 +129,6 @@ print '<div class="fichecenter">';
print '<br>'; print '<br>';
/*
print '<hr>';
//print '<div class="underbanner clearboth"></div>';
print '<br>';
*/
print '<span class="opacitymedium">'.$langs->trans("UserPublicPageDesc").'</span><br><br>'; print '<span class="opacitymedium">'.$langs->trans("UserPublicPageDesc").'</span><br><br>';
$param = '&id='.((int) $object->id); $param = '&id='.((int) $object->id);
@ -160,12 +152,16 @@ print '<input type="hidden" id="USER_ENABLE_PUBLIC" name="USER_ENABLE_PUBLIC" va
print '<br><br>'; print '<br><br>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
if (getDolUserInt('USER_ENABLE_PUBLIC', 0, $object)) { if (getDolUserInt('USER_ENABLE_PUBLIC', 0, $object)) {
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<br>'; print '<br>';
//print $langs->trans('FollowingLinksArePublic').'<br>'; //print $langs->trans('FollowingLinksArePublic').'<br>';
print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans('PublicVirtualCardUrl').'</span><br>'; print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans('PublicVirtualCardUrl').'</span><br>';
@ -173,11 +169,41 @@ if (getDolUserInt('USER_ENABLE_PUBLIC', 0, $object)) {
print '<div class="urllink">'; print '<div class="urllink">';
print '<input type="text" id="publicurluser" class="quatrevingtpercentminusx" value="'.$fullexternaleurltovirtualcard.'">'; print '<input type="text" id="publicurluser" class="quatrevingtpercentminusx" value="'.$fullexternaleurltovirtualcard.'">';
print '<a target="_blank" rel="noopener noreferrer" href="'.$fullexternaleurltovirtualcard.'">'.img_picto('', 'globe', 'class="paddingleft"').'</a>'; print '<a target="_blank" rel="noopener noreferrer" href="'.$fullexternaleurltovirtualcard.'">'.img_picto('', 'globe', 'class="paddingleft marginrightonly paddingright"').$langs->trans("GoTo").'...</a>';
print '</div>'; print '</div>';
print ajax_autoselect('publicurluser'); print ajax_autoselect('publicurluser');
print '<br>'; print '<br>';
print '<br>';
// Show/Hide options
print '<div class="centpercent margintoponly marginbottomonly">';
print img_picto('', 'setup', 'class="pictofixedwidth"').'<a id="lnk" href="#">'.$langs->trans("ShowAdvancedOptions").'...</a>';
print '</div>';
print '<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#lnk").click(function() {
console.log("We click on link");
hideoptions(this);
});
});
function hideoptions(domelem) {
const div = document.getElementById("div_container_sub_exportoptions");
if (div.style.display === "none") {
div.style.display = "block";
domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("HideAdvancedoptions")).'";
} else {
div.style.display = "none";
domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("ShowAdvancedOptions")).'...";
}
}
</script>';
// Start div hide/Show
print '<div id="div_container_sub_exportoptions" style="display: none;">';
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
@ -273,19 +299,33 @@ if (getDolUserInt('USER_ENABLE_PUBLIC', 0, $object)) {
print '<div class="center">'; print '<div class="center">';
print $form->buttonsSaveCancel("Save", ($dol_openinpopup ? "Cancel" : ""), array(), 0, '', $dol_openinpopup); print $form->buttonsSaveCancel("Save", ($dol_openinpopup ? "Cancel" : ""), array(), 0, '', $dol_openinpopup);
print '</div>'; print '</div>';
print '<br>';
print '</div>'; // End hide/show
print '<br>';
// Preview
print '<div class="center">';
print '<span class="opacitymedium">'.$langs->trans("Preview").'</span><br>';
print '<div class="virtualcard-div">';
print '<a target="_blank" rel="noopener noreferrer" href="'.$fullexternaleurltovirtualcard.'">';
print '<iframe id="virtualcard-iframe" title="" class="center" src="'.$fullexternaleurltovirtualcard.'&mode=preview">';
print '</iframe>';
print '</a>';
print '</div>';
print '</div>';
print '<br>';
} }
print dol_get_fiche_end();
print '</form>'; print '</form>';
print '</div>'; print '</div>';
print dol_get_fiche_end();
// End of page // End of page
llxFooter(); llxFooter();
$db->close(); $db->close();