From 91caea5707b50ed2dc882fae810895b21a571a27 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 Mar 2016 15:53:44 +0100 Subject: [PATCH] Code was corrupted with very bad commits. I restore files manually. --- ChangeLog | 4 +- dev/skeletons/skeleton_card.php | 2 +- dev/skeletons/skeleton_list.php | 2 +- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 22 ++-- htdocs/accountancy/bookkeeping/balance.php | 4 +- htdocs/accountancy/bookkeeping/card.php | 4 +- htdocs/accountancy/bookkeeping/list.php | 8 +- htdocs/accountancy/bookkeeping/listbyyear.php | 6 +- htdocs/accountancy/journal/bankjournal.php | 81 +++++++------ .../accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- htdocs/accountancy/supplier/lines.php | 2 +- htdocs/adherents/admin/adherent.php | 6 +- htdocs/adherents/admin/public.php | 6 +- .../actions_adherentcard_common.class.php | 4 +- .../actions_adherentcard_default.class.php | 2 +- htdocs/adherents/card.php | 24 ++-- htdocs/adherents/card_subscriptions.php | 8 +- htdocs/adherents/cotisations.php | 2 +- htdocs/adherents/fiche_subscription.php | 10 +- htdocs/adherents/list.php | 2 +- htdocs/adherents/type.php | 10 +- htdocs/admin/boxes.php | 2 +- htdocs/admin/clicktodial.php | 2 +- htdocs/admin/delais.php | 2 +- htdocs/admin/dict.php | 35 +----- htdocs/admin/facture.php | 4 +- htdocs/admin/ihm.php | 18 +-- htdocs/admin/mails.php | 6 +- htdocs/admin/menus/index.php | 2 +- htdocs/admin/multicurrency.php | 6 +- htdocs/admin/pdf.php | 20 ++-- htdocs/admin/propal.php | 2 +- htdocs/admin/proxy.php | 2 +- htdocs/admin/sms.php | 2 +- htdocs/admin/stock.php | 24 ++-- htdocs/admin/tools/listevents.php | 4 +- htdocs/admin/tools/listsessions.php | 4 +- htdocs/admin/tools/purge.php | 2 +- htdocs/admin/websites.php | 2 +- htdocs/cashdesk/admin/cashdesk.php | 6 +- htdocs/cashdesk/tpl/facturation1.tpl.php | 28 ++--- htdocs/categories/categorie.php | 8 +- htdocs/categories/photos.php | 2 +- htdocs/categories/viewcat.php | 2 +- htdocs/comm/action/card.php | 32 ++--- htdocs/comm/action/document.php | 2 +- htdocs/comm/action/listactions.php | 6 +- htdocs/comm/action/pertype.php | 2 +- htdocs/comm/action/peruser.php | 2 +- htdocs/comm/address.php | 2 +- htdocs/comm/card.php | 8 +- htdocs/comm/mailing/card.php | 24 ++-- htdocs/comm/mailing/cibles.php | 2 +- htdocs/comm/propal.php | 26 ++-- htdocs/comm/propal/apercu.php | 2 +- htdocs/comm/propal/contact.php | 2 +- htdocs/comm/propal/document.php | 2 +- htdocs/comm/propal/note.php | 2 +- htdocs/comm/remx.php | 4 +- htdocs/commande/apercu.php | 2 +- htdocs/commande/card.php | 24 ++-- htdocs/commande/contact.php | 2 +- htdocs/commande/document.php | 2 +- htdocs/commande/list.php | 4 +- htdocs/commande/note.php | 2 +- htdocs/commande/orderstoinvoice.php | 6 +- htdocs/compta/bank/account.php | 12 +- htdocs/compta/bank/annuel.php | 2 +- htdocs/compta/bank/card.php | 6 +- htdocs/compta/bank/document.php | 4 +- htdocs/compta/bank/graph.php | 2 +- htdocs/compta/bank/ligne.php | 8 +- htdocs/compta/bank/releve.php | 2 +- htdocs/compta/bank/search.php | 6 +- htdocs/compta/bank/treso.php | 2 +- htdocs/compta/bank/virement.php | 2 +- htdocs/compta/deplacement/card.php | 20 ++-- htdocs/compta/deplacement/document.php | 2 +- htdocs/compta/deplacement/list.php | 2 +- htdocs/compta/facture.php | 32 ++--- htdocs/compta/facture/apercu.php | 2 +- htdocs/compta/facture/contact.php | 2 +- htdocs/compta/facture/document.php | 2 +- htdocs/compta/facture/fiche-rec.php | 20 ++-- htdocs/compta/facture/list.php | 4 +- htdocs/compta/facture/note.php | 2 +- htdocs/compta/facture/prelevement.php | 6 +- htdocs/compta/journal/purchasesjournal.php | 2 +- htdocs/compta/journal/sellsjournal.php | 2 +- htdocs/compta/localtax/card.php | 68 ++++------- htdocs/compta/localtax/clients.php | 4 +- htdocs/compta/localtax/index.php | 32 +++-- htdocs/compta/localtax/quadri_detail.php | 4 +- htdocs/compta/paiement.php | 4 +- htdocs/compta/paiement/card.php | 18 +-- htdocs/compta/paiement/cheque/card.php | 12 +- .../cheque/class/remisecheque.class.php | 2 +- htdocs/compta/paiement/cheque/list.php | 2 +- htdocs/compta/paiement/list.php | 2 +- htdocs/compta/paiement_charge.php | 2 +- htdocs/compta/payment_sc/card.php | 6 +- htdocs/compta/prelevement/card.php | 6 +- htdocs/compta/prelevement/ligne.php | 4 +- htdocs/compta/prelevement/list.php | 2 +- htdocs/compta/resultat/clientfourn.php | 6 +- htdocs/compta/salaries/card.php | 10 +- htdocs/compta/salaries/document.php | 2 +- htdocs/compta/salaries/index.php | 2 +- htdocs/compta/sociales/charges.php | 16 +-- htdocs/compta/sociales/document.php | 6 +- htdocs/compta/sociales/index.php | 2 +- htdocs/compta/stats/cabyprodserv.php | 4 +- htdocs/compta/stats/cabyuser.php | 4 +- htdocs/compta/stats/casoc.php | 4 +- htdocs/compta/tva/card.php | 96 +++++++-------- htdocs/compta/tva/clients.php | 4 +- htdocs/compta/tva/index.php | 2 +- htdocs/compta/tva/quadri_detail.php | 4 +- htdocs/compta/tva/quarter_report.php | 4 +- htdocs/compta/tva/reglement.php | 15 +-- .../actions_contactcard_common.class.php | 4 +- .../actions_contactcard_default.class.php | 2 +- htdocs/contact/card.php | 12 +- htdocs/contact/perso.php | 2 +- htdocs/contrat/card.php | 44 +++---- htdocs/contrat/contact.php | 2 +- htdocs/contrat/document.php | 2 +- htdocs/contrat/list.php | 2 +- htdocs/contrat/note.php | 2 +- htdocs/contrat/services.php | 6 +- htdocs/core/ajax/ajaxdirpreview.php | 2 +- htdocs/core/class/extrafields.class.php | 4 +- htdocs/core/class/html.form.class.php | 37 +++--- htdocs/core/class/html.formfile.class.php | 4 +- htdocs/core/class/html.formmail.class.php | 2 +- htdocs/core/lib/admin.lib.php | 2 +- htdocs/core/lib/functions.lib.php | 5 +- htdocs/core/lib/pdf.lib.php | 113 +++++++++--------- htdocs/core/lib/project.lib.php | 2 +- htdocs/core/menus/init_menu_auguria.sql | 29 ++--- htdocs/core/menus/standard/eldy.lib.php | 11 -- .../doc/doc_generic_order_odt.modules.php | 22 +--- .../modules/commande/mod_commande_saphir.php | 2 + .../modules/contract/mod_contract_magre.php | 2 + .../doc/doc_generic_shipment_odt.modules.php | 21 +--- .../expedition/mod_expedition_ribera.php | 2 + .../doc/doc_generic_invoice_odt.modules.php | 21 +--- .../modules/facture/mod_facture_mercure.php | 2 + htdocs/core/modules/fichinter/mod_arctic.php | 2 + .../livraison/mod_livraison_saphir.php | 2 + .../core/modules/mailings/fraise.modules.php | 4 +- .../core/modules/modExpenseReport.class.php | 107 +++++++++++++++++ .../core/modules/payment/mod_payment_ant.php | 2 + .../doc/doc_generic_project_odt.modules.php | 22 +--- .../modules/project/mod_project_universal.php | 2 + .../task/doc/doc_generic_task_odt.modules.php | 22 +--- .../project/task/mod_task_universal.php | 2 + .../doc/doc_generic_proposal_odt.modules.php | 21 +--- .../modules/propale/mod_propale_saphir.php | 2 + .../societe/doc/doc_generic_odt.modules.php | 22 +--- .../mod_facture_fournisseur_tulip.php | 2 + .../mod_commande_fournisseur_orchidee.php | 2 + .../mod_supplier_payment_brodator.php | 2 + ..._generic_supplier_proposal_odt.modules.php | 21 +--- .../mod_supplier_proposal_saphir.php | 2 + .../tpl/document_actions_post_headers.tpl.php | 2 +- htdocs/core/tpl/notes.tpl.php | 8 +- htdocs/core/tpl/objectline_create.tpl.php | 8 +- htdocs/core/tpl/objectline_edit.tpl.php | 4 +- htdocs/core/tpl/resource_add.tpl.php | 4 +- htdocs/core/tpl/resource_view.tpl.php | 4 +- htdocs/cron/card.php | 18 +-- htdocs/cron/list.php | 4 +- htdocs/don/card.php | 16 +-- htdocs/don/document.php | 2 +- htdocs/don/list.php | 2 +- htdocs/don/payment/card.php | 6 +- htdocs/don/payment/payment.php | 2 +- htdocs/ecm/docdir.php | 2 +- htdocs/ecm/docfile.php | 2 +- htdocs/ecm/docmine.php | 4 +- htdocs/ecm/docother.php | 2 +- htdocs/ecm/index.php | 6 +- htdocs/ecm/index_auto.php | 4 +- htdocs/expedition/card.php | 28 ++--- htdocs/expedition/contact.php | 2 +- htdocs/expedition/list.php | 2 +- htdocs/expedition/note.php | 2 +- htdocs/expedition/shipment.php | 6 +- htdocs/expensereport/card.php | 34 +++--- htdocs/expensereport/document.php | 2 +- htdocs/expensereport/list.php | 2 +- htdocs/expensereport/payment/card.php | 6 +- htdocs/expensereport/payment/payment.php | 2 +- htdocs/expensereport/synchro_compta.php | 4 +- htdocs/exports/export.php | 2 +- htdocs/fichinter/apercu.php | 2 +- htdocs/fichinter/card.php | 18 +-- htdocs/fichinter/contact.php | 2 +- htdocs/fichinter/document.php | 2 +- htdocs/fichinter/list.php | 2 +- htdocs/fichinter/note.php | 2 +- htdocs/fourn/card.php | 4 +- htdocs/fourn/commande/card.php | 34 +++--- htdocs/fourn/commande/contact.php | 2 +- htdocs/fourn/commande/dispatch.php | 6 +- htdocs/fourn/commande/document.php | 2 +- htdocs/fourn/commande/history.php | 2 +- htdocs/fourn/commande/list.php | 4 +- htdocs/fourn/commande/note.php | 2 +- htdocs/fourn/commande/orderstoinvoice.php | 6 +- htdocs/fourn/facture/card.php | 32 ++--- htdocs/fourn/facture/contact.php | 6 +- htdocs/fourn/facture/document.php | 8 +- htdocs/fourn/facture/impayees.php | 2 +- htdocs/fourn/facture/list.php | 2 +- htdocs/fourn/facture/note.php | 6 +- htdocs/fourn/facture/paiement.php | 6 +- htdocs/fourn/paiement/card.php | 18 +-- htdocs/ftp/admin/ftpclient.php | 4 +- htdocs/ftp/index.php | 4 +- htdocs/holiday/card.php | 24 ++-- htdocs/holiday/document.php | 6 +- htdocs/holiday/list.php | 2 +- htdocs/hrm/establishment/card.php | 2 +- htdocs/imports/import.php | 2 +- htdocs/includes/odtphp/Segment.php | 54 +-------- htdocs/includes/odtphp/odf.php | 5 +- .../install/mysql/migration/3.9.0-4.0.0.sql | 16 +-- htdocs/langs/en_US/accountancy.lang | 5 +- htdocs/langs/en_US/admin.lang | 2 +- htdocs/langs/en_US/main.lang | 2 +- htdocs/livraison/card.php | 10 +- htdocs/loan/card.php | 14 +-- htdocs/loan/document.php | 6 +- htdocs/loan/note.php | 2 +- htdocs/loan/payment/card.php | 6 +- htdocs/loan/payment/payment.php | 2 +- htdocs/margin/agentMargins.php | 4 +- htdocs/margin/checkMargins.php | 4 +- htdocs/margin/customerMargins.php | 4 +- htdocs/margin/productMargins.php | 4 +- htdocs/opensurvey/card.php | 6 +- htdocs/opensurvey/list.php | 2 +- htdocs/opensurvey/results.php | 4 +- htdocs/opensurvey/wizard/create_survey.php | 2 +- htdocs/paypal/admin/paypal.php | 8 +- htdocs/product/admin/product.php | 10 +- .../product/actions_card_product.class.php | 10 +- .../product/canvas/product/tpl/list.tpl.php | 2 +- .../service/actions_card_service.class.php | 10 +- .../product/canvas/service/tpl/list.tpl.php | 2 +- htdocs/product/card.php | 8 +- htdocs/product/composition/card.php | 2 +- htdocs/product/fournisseurs.php | 2 +- htdocs/product/list.php | 4 +- htdocs/product/price.php | 2 +- htdocs/product/reassort.php | 2 +- htdocs/product/reassortlot.php | 2 +- htdocs/product/stock/card.php | 4 +- htdocs/product/stock/fiche-valo.php | 2 +- htdocs/product/stock/list.php | 2 +- htdocs/product/stock/mouvement.php | 2 +- htdocs/product/stock/product.php | 12 +- htdocs/product/stock/replenish.php | 2 +- htdocs/product/stock/replenishorders.php | 2 +- .../product/stock/tpl/stockcorrection.tpl.php | 4 +- .../product/stock/tpl/stocktransfer.tpl.php | 4 +- htdocs/projet/activity/perday.php | 2 +- htdocs/projet/activity/perweek.php | 2 +- htdocs/projet/admin/project.php | 4 +- htdocs/projet/card.php | 20 ++-- htdocs/projet/contact.php | 2 +- htdocs/projet/document.php | 2 +- htdocs/projet/element.php | 6 +- htdocs/projet/ganttview.php | 2 +- htdocs/projet/list.php | 2 +- htdocs/projet/note.php | 2 +- htdocs/projet/tasks.php | 6 +- htdocs/projet/tasks/contact.php | 4 +- htdocs/projet/tasks/document.php | 4 +- htdocs/projet/tasks/list.php | 2 +- htdocs/projet/tasks/note.php | 4 +- htdocs/projet/tasks/task.php | 10 +- htdocs/projet/tasks/time.php | 10 +- htdocs/public/members/new.php | 2 +- htdocs/public/test/test_arrays.php | 2 +- htdocs/public/test/test_forms.php | 12 +- htdocs/resource/card.php | 4 +- htdocs/resource/element_resource.php | 4 +- htdocs/resource/list.php | 2 +- .../canvas/actions_card_common.class.php | 14 +-- .../company/actions_card_company.class.php | 2 +- .../actions_card_individual.class.php | 2 +- htdocs/societe/consumption.php | 2 +- htdocs/societe/list.php | 2 +- htdocs/societe/price.php | 2 +- htdocs/societe/rib.php | 2 +- htdocs/societe/soc.php | 30 ++--- htdocs/supplier_proposal/card.php | 18 +-- htdocs/supplier_proposal/document.php | 2 +- htdocs/supplier_proposal/note.php | 2 +- htdocs/user/card.php | 18 +-- htdocs/user/group/card.php | 4 +- htdocs/user/group/ldap.php | 2 +- htdocs/user/group/perms.php | 2 +- htdocs/user/hierarchy.php | 2 +- htdocs/user/index.php | 4 +- .../accountancy/export-thirdpartyaccount.php | 2 +- 311 files changed, 1199 insertions(+), 1334 deletions(-) diff --git a/ChangeLog b/ChangeLog index 204eeddf8a6..a83fc453a65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,9 +24,7 @@ Dolibarr 4.0 should be compatible with PHP 7 but more feedbacks are still expect Following changes may create regression for some external modules, but were necessary to make Dolibarr better: -- Method FormBank::select_type_comptes_financiers() has been renamed into FormBank::selectTypeOfBankAccount() -- Method Form::form_date() has been renamed into Form::formDate() -- Method Form::select_date() has been renamed into Form::selectDate() +- Method select_type_comptes_financiers() has been renamed into selectTypeOfBankAccount() diff --git a/dev/skeletons/skeleton_card.php b/dev/skeletons/skeleton_card.php index b122e9a86c7..03f70955527 100644 --- a/dev/skeletons/skeleton_card.php +++ b/dev/skeletons/skeleton_card.php @@ -288,7 +288,7 @@ if ($id && (empty($action) || $action == 'view' || $action == 'delete')) dol_fiche_head(); if ($action == 'delete') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); print $formconfirm; } diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 29ca9261a70..2321b76aac8 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -370,7 +370,7 @@ if ($resql) }*/ // Action column print ''; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print ''; print ''."\n"; diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 9e16c81dcd5..3f251e0090b 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -62,7 +62,7 @@ if (! $sortorder) $sortorder = "ASC"; if ($action == 'delete') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); + $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); print $formconfirm; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index e1e4b3346d7..e04cc7132f0 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -162,12 +162,12 @@ if ($action == 'create') { // Date start print '' . $langs->trans("DateStart") . ''; - print Form::selectDate(($date_start ? $date_start : ''), 'fiscalyear'); + print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear'); print ''; // Date end print '' . $langs->trans("DateEnd") . ''; - print Form::selectDate(($date_end ? $date_end : - 1), 'fiscalyearend'); + print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); print ''; // Statut @@ -216,12 +216,12 @@ if ($action == 'create') { // Date start print '' . $langs->trans("DateStart") . ''; - print Form::selectDate($object->date_start ? $object->date_start : - 1, 'fiscalyear'); + print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear'); print ''; // Date end print '' . $langs->trans("DateEnd") . ''; - print Form::selectDate($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); + print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); print ''; // Statut @@ -245,7 +245,7 @@ if ($action == 'create') { * Confirm delete */ if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); + print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); } dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); @@ -263,23 +263,23 @@ if ($action == 'create') { // Label print ''; - print Form::editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print ''; - print Form::editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print ""; // Date start print ''; - print Form::editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print $form->editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; - print Form::editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print $form->editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; // Date end print ''; - print Form::editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print $form->editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; - print Form::editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print $form->editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; // Statut diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index f44f9620d8e..3e4b69d6624 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -161,9 +161,9 @@ else { print '
'; print $langs->trans('DateStart') . ': '; - print Form::selectDate($search_date_start, 'date_start', 0, 0, 1); + print $form->select_date($search_date_start, 'date_start', 0, 0, 1); print $langs->trans('DateEnd') . ': '; - print Form::selectDate($search_date_end, 'date_end', 0, 0, 1); + print $form->select_date($search_date_end, 'date_end', 0, 0, 1); print '
'; print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index f459f306d31..b77bc5446af 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -203,7 +203,7 @@ $formventilation = new FormVentilation($db); * Confirmation to delete the command */ if ($action == 'delete') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); + $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); print $formconfirm; } @@ -248,7 +248,7 @@ if ($action == 'create') { print ''; print ''; print ''; print ''; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index f2ada190468..b507c4dfffa 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -340,7 +340,7 @@ else { } if ($action == 'delmouv') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); print $formconfirm; } if ($action == 'delbookkeepingyear') { @@ -361,7 +361,7 @@ else { 'default' => $delyear ); - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); print $formconfirm; } @@ -394,10 +394,10 @@ else { print ''; print ''; print ''; print ''; print '"; print ""; - print ""; + print ""; print ""; + // print ""; if ($val['soclib'] == '') { - print ""; + print ""; } else { - print ""; + print ""; } print ""; print ""; @@ -623,9 +619,19 @@ else { if ($k != 'type') { print ""; print ""; - print ""; + print ""; + // print ""; + if (length_accounta($k) == '') { + print ""; + } else { print ""; - print ""; + } + // print ""; + if ($val['soclib'] == '') { + print ""; + } else { + print ""; + } print ""; print ""; print ""; @@ -636,9 +642,14 @@ else { foreach ( $tabbq[$key] as $k => $mt ) { print ""; print ""; - print ""; - print ""; print ""; + print ""; + // print ""; + if ($val['soclib'] == '') { + print ""; + } else { + print ""; + } print ""; print ""; print ""; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 6f8642a4c47..82811598188 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -403,7 +403,7 @@ if ($action == 'export_csv') { $description .= $langs->trans("DepositsAreIncluded"); } - $period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( 'action' => '' )); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 65e383dce88..670875ec52b 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -418,7 +418,7 @@ if ($action == 'export_csv') { $description .= $langs->trans("DepositsAreNotIncluded"); else $description .= $langs->trans("DepositsAreIncluded"); - $period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( 'action' => '' )); diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 5ced4aa5f84..ade361fdd51 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -221,7 +221,7 @@ if ($result) { print ''; print ''; print ''; print "\n"; diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 3a205b21723..8e265eb70f7 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -134,7 +134,7 @@ print ''; print ''; print ''; print '\n"; @@ -147,7 +147,7 @@ print ''; print ''; print ''; print '\n"; @@ -160,7 +160,7 @@ print ''; print ''; print ''; print '\n"; diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 0023a4baca9..6f5d1de5c87 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -149,7 +149,7 @@ print ''; print '\n"; // Type @@ -158,7 +158,7 @@ print ''; print '\n"; */ // Amount @@ -176,7 +176,7 @@ print ''; print '\n"; if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 609e050d9ef..8d629175902 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -338,7 +338,7 @@ abstract class ActionsAdherentCardCommon if ($action == 'view' || $action == 'delete') { - $this->tpl['showrefnav'] = Form::showrefnav($this->object,'id'); + $this->tpl['showrefnav'] = $form->showrefnav($this->object,'id'); if ($this->object->socid > 0) { @@ -385,7 +385,7 @@ abstract class ActionsAdherentCardCommon array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password)); - $this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no'); + $this->tpl['action_create_user'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no'); } } diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index 702438a9f68..7e0b1291998 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -108,7 +108,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon // Confirm delete contact if ($action == 'delete' && $user->rights->adherent->supprimer) { - $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1); + $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1); } } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 2ab8640460b..f17ca46299f 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -900,12 +900,12 @@ else // Birthday print "\n"; // Public profil print "\n"; // Categories @@ -1154,12 +1154,12 @@ else // Birthday print "\n"; // Public profil print "\n"; // Categories @@ -1278,7 +1278,7 @@ else if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser"); else $text.=$langs->trans("UserWillBeInternalUser"); } - print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); + print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); } // Confirm create third party @@ -1297,7 +1297,7 @@ else // Create a form array $formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } // Confirm validate member @@ -1333,13 +1333,13 @@ else if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); } - print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1); + print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1); } // Confirm send card by mail if ($action == 'sendinfo') { - print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); + print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); } // Confirm terminate @@ -1370,7 +1370,7 @@ else $formquestion=array(); if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false')); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1); + print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1); } // Confirm remove member @@ -1378,7 +1378,7 @@ else { $formquestion=array(); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); + print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); } /* @@ -1386,7 +1386,7 @@ else */ if ($action == 'add_spip') { - print Form::formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); + print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); } /* @@ -1394,7 +1394,7 @@ else */ if ($action == 'del_spip') { - print Form::formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); + print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); } $rowspan=17; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 650508df95a..998dc53d525 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -929,7 +929,7 @@ if ($rowid > 0) // Create a form array $formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } @@ -974,7 +974,7 @@ if ($rowid > 0) $datefrom=$object->datevalid; } } - print Form::selectDate($datefrom,'','','','',"cotisation",1,1,1); + print $form->select_date($datefrom,'','','','',"cotisation",1,1,1); print ""; // Date end subscription @@ -987,7 +987,7 @@ if ($rowid > 0) $dateto=-1; // By default, no date is suggested } print '"; if ($adht->cotisation) @@ -1088,7 +1088,7 @@ if ($rowid > 0) // Date of payment print '\n"; print ''; diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index 3ecc840c1bb..6b980a4df1c 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -196,7 +196,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Ref print ''; print ''; // Member @@ -207,13 +207,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Date start subscription print ''; print ''; // Date end subscription print ''; print ''; @@ -295,7 +295,7 @@ if ($rowid && $action != 'edit') //$formquestion['text']=''.$langs->trans("ThisWillAlsoDeleteBankRecord").''; $text=$langs->trans("ConfirmDeleteSubscription"); if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='
'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord"); - print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1); } print ''; @@ -307,7 +307,7 @@ if ($rowid && $action != 'edit') // Ref print ''; print ''; // Member diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index beea3c5029e..aea09f73124 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -287,7 +287,7 @@ if ($resql) // Action column print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index a8c59995bf4..f46b6d0268c 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -236,11 +236,11 @@ if ($action == 'create') print ''; print ''; print ''; print ''; print ''; // Label @@ -634,11 +634,11 @@ if ($rowid > 0) print ''; print ''; print ''; print ''; if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { $var=!$var; print ''; print ''; } diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 1bba473b374..a77fb706a71 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -83,7 +83,7 @@ print "\n"; $var=!$var; print ''; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 984480a3cef..14332ceee63 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -184,7 +184,7 @@ if ($action == 'edit') $var=false; print ''; - print ''; + print ''; print '
' . $langs->trans("Docdate") . ''; - print Form::selectDate('', 'doc_date', '', '', '', "create_mvt", 1, 1); + print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); print '
'; print $langs->trans('From') . ': '; - print Form::selectDate($search_date_start, 'date_start', 0, 0, 1); + print $form->select_date($search_date_start, 'date_start', 0, 0, 1); print '
'; print $langs->trans('To') . ': '; - print Form::selectDate($search_date_end, 'date_end', 0, 0, 1); + print $form->select_date($search_date_end, 'date_end', 0, 0, 1); print '
'; diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index f9f86002376..10640c1887a 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -176,9 +176,9 @@ print_barre_liste($langs->trans("Bookkeeping") . ' ' . dol_print_date($search_da print '
'; print '
'; print $langs->trans('DateStart') . ': '; -print Form::selectDate($search_date_start, 'date_start'); +print $form->select_date($search_date_start, 'date_start'); print $langs->trans('DateEnd') . ': '; -print Form::selectDate($search_date_end, 'date_end'); +print $form->select_date($search_date_end, 'date_end'); print '
'; print '
'; print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': '; @@ -220,7 +220,7 @@ print ''; -print Form::selectDate($search_doc_date, 'doc_date', 0, 0, 1); +print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1); print '
'; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 4d1d71f48b9..f995b2684ee 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -52,9 +52,8 @@ require_once DOL_DOCUMENT_ROOT . '/societe/class/client.class.php'; $langs->load("companies"); $langs->load("other"); $langs->load("compta"); -$langs->load("banks"); +$langs->load("bank"); $langs->load('bills'); -$langs->load('donations'); $langs->load("accountancy"); $id_bank_account = GETPOST('id_account', 'int'); @@ -131,12 +130,11 @@ if ($result) { $num = $db->num_rows($result); // Variables - $account_supplier = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef")); - $account_customer = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef")); - $account_employee = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef")); - $account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef")); - $account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef")); - $account_transfer = (! empty($conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH) ? $conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH : $langs->trans("CodeNotDef")); + $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef")); + $cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef")); + $accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef")); + $accountancy_account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef")); + $accountancy_account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef")); $tabpay = array (); $tabbq = array (); @@ -156,9 +154,11 @@ if ($result) { // Controls $compta_bank = $obj->account_number; if ($obj->label == '(SupplierInvoicePayment)') - $compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $account_supplier); + $compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $cptfour); if ($obj->label == '(CustomerInvoicePayment)') - $compta_soc = (! empty($obj->code_compta) ? $obj->code_compta : $account_customer); + $compta_soc = (! empty($obj->code_compta) ? $obj->code_compta : $cptcli); + if ($obj->typeop == '(BankTransfert)') + $compta_soc = $conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH; // Variable bookkeeping $tabpay[$obj->rowid]["date"] = $obj->do; @@ -226,23 +226,25 @@ if ($result) { $paymentdonstatic->id = $links[$key]['url_id']; $paymentdonstatic->fk_donation = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentDonation"); - $tabtp[$obj->rowid][$account_pay_donation] += $obj->amount; + $tabtp[$obj->rowid][$accountancy_account_pay_donation] += $obj->amount; } else if ($links[$key]['type'] == 'payment_vat') { $paymentvatstatic->id = $links[$key]['url_id']; $paymentvatstatic->ref = $links[$key]['url_id']; - $paymentvatstatic->label = $links[$key]['label']; $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat"); - $tabtp[$obj->rowid][$account_pay_vat] += $obj->amount; + $tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount; } else if ($links[$key]['type'] == 'payment_salary') { $paymentsalstatic->id = $links[$key]['url_id']; $paymentsalstatic->ref = $links[$key]['url_id']; $paymentsalstatic->label = $links[$key]['label']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); - $tabtp[$obj->rowid][$account_employee ] += $obj->amount; + $tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount; } else if ($links[$key]['type'] == 'banktransfert') { - $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("BankTransfer"); - $tabtp[$obj->rowid][$account_transfer] += $obj->amount; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); + $tabtp[$obj->rowid][$cpttva] += $obj->amount; } + /*else { + $tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount; + }*/ } } @@ -539,7 +541,7 @@ else { $nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1); $builddate = time(); $description = $langs->trans("DescFinanceJournal") . '
'; - $period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $varlink = 'id_account=' . $id_bank_account; report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( @@ -586,30 +588,24 @@ else { foreach ( $tabpay as $key => $val ) { $date = dol_print_date($db->jdate($val["date"]), 'day'); - $reflabel = $val["ref"]; - if ($reflabel == '(SupplierInvoicePayment)') { - $reflabel = $langs->trans('Supplier'); + if ($val["lib"] == '(SupplierInvoicePayment)') { + $reflabel = $langs->trans('SupplierInvoicePayment'); } - if ($reflabel == '(CustomerInvoicePayment)') { - $reflabel = $langs->trans('Customer'); - } - if ($reflabel == '(SocialContributionPayment)') { - $reflabel = $langs->trans('SocialContribution'); - } - if ($reflabel == '(DonationPayment)') { - $reflabel = $langs->trans('Donation'); + if ($val["lib"] == '(CustomerInvoicePayment)') { + $reflabel = $langs->trans('CustomerInvoicePayment'); } // Bank foreach ( $tabbq[$key] as $k => $mt ) { print "
" . $date . "" . $ref . "" . $reflabel . "" . length_accountg($k) . "" . $langs->trans('Bank') . "" . $bank_code_journal->label . " - " . $val["ref"] . "" . $langs->trans('Bank') . " - " . $val["ref"] . "" . $bank_code_journal->label . " - " . $val['soclib'] . "" . $langs->trans("Bank") . " - " . $val['soclib'] . "" . $val["type_payment"] . "" . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $ref . "" . $val["soclib"] . "" . length_accounta($k) . "" . length_accounta($conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH) . "" . length_accounta($k) . "" . $reflabel . ' ' . $val['soclib'] . "" . $langs->trans('ThirdParty') . " (" . $val['soclib'] . ")" . $langs->trans('ThirdParty') . " - " . $val["ref"] . "" . $langs->trans("ThirdParty") . ' - ' . $val['soclib'] . "" . $val["type_payment"] . "" . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $ref . "" . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . "" . $reflabel . "" . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . "" . $langs->trans('ThirdParty') . "" . $langs->trans('ThirdParty') . " - " . $val["ref"] . "" . $langs->trans("ThirdParty") . ' - ' . $val['soclib'] . " " . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . " '; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'.$langs->trans("AdherentLoginRequired").''; -print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); +print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); print ''; print ''; print "
'.$langs->trans("AdherentMailRequired").''; -print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); +print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); print ''; print ''; print "
'.$langs->trans("MemberSendInformationByMailByDefault").''; -print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); +print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); print ''; print ''; print "
'; print $langs->trans("EnablePublicSubscriptionForm"); print ''; -print Form::selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); +print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); print "
'; print $langs->trans("EnablePublicSubscriptionForm"); print ''; -print Form::selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); +print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); print "
'; print $langs->trans("CanEditAmount"); print ''; -print Form::selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); +print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); print "
".$langs->trans("Birthday")."\n"; - Form::selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "
".$langs->trans("Public")."\n"; - print Form::selectyesno("public",$object->public,1); + print $form->selectyesno("public",$object->public,1); print "
".$langs->trans("Birthday")."\n"; - Form::selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "
".$langs->trans("Public")."\n"; - print Form::selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); + print $form->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); print "
'.$langs->trans("DateEndSubscription").''; - print Form::selectDate($dateto,'end','','','',"cotisation",1,0,1); + print $form->select_date($dateto,'end','','','',"cotisation",1,0,1); print "
'.$langs->trans("DatePayment").''; - print Form::selectDate(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); + print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); print "
'.$langs->trans('Numero'); diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 5f319652182..301664fab83 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -200,7 +200,7 @@ if ($result) // Action column print ''; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'.$langs->trans("Ref").''; - print Form::showrefnav($subscription, 'rowid', $linkback, 1); + print $form->showrefnav($subscription, 'rowid', $linkback, 1); print '
'.$langs->trans("DateSubscription").''; - Form::selectDate($subscription->dateh,'datesub',1,1,0,'update',1); + $form->select_date($subscription->dateh,'datesub',1,1,0,'update',1); print '
'.$langs->trans("DateEndSubscription").''; - Form::selectDate($subscription->datef,'datesubend',0,0,0,'update',1); + $form->select_date($subscription->datef,'datesubend',0,0,0,'update',1); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($subscription, 'rowid', $linkback, 1); + print $form->showrefnav($subscription, 'rowid', $linkback, 1); print '
'; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; - print Form::selectyesno("cotisation",1,1); + print $form->selectyesno("cotisation",1,1); print '
'.$langs->trans("VoteAllowed").''; - print Form::selectyesno("vote",0,1); + print $form->selectyesno("vote",0,1); print '
'.$langs->trans("Description").''; @@ -297,7 +297,7 @@ if ($rowid > 0) // Ref print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'rowid', $linkback); + print $form->showrefnav($object, 'rowid', $linkback); print '
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; - print Form::selectyesno("cotisation",$object->cotisation,1); + print $form->selectyesno("cotisation",$object->cotisation,1); print '
'.$langs->trans("VoteAllowed").''; - print Form::selectyesno("vote",$object->vote,1); + print $form->selectyesno("vote",$object->vote,1); print '
'.$langs->trans("Description").''; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 9b302a159d5..9e09bf87b1d 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -472,7 +472,7 @@ print '
'.$langs->trans("EnableFileCache").''; - print Form::selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); + print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); print '
'; print $langs->trans("ClickToDialUseTelLink").''; -print Form::selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'
'; +print $form->selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'
'; print '
'; print $langs->trans("ClickToDialUseTelLinkDesc"); print '
'.$langs->trans("MAIN_DISABLE_METEO").'' .Form::selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '
'.$langs->trans("MAIN_DISABLE_METEO").'' .$form->selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '
'; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index b8a68e4e02d..8ee8b791303 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2015 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * @@ -78,7 +78,7 @@ $hookmanager->initHooks(array('admin')); // Put here declaration of dictionaries properties // Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this. -$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,25,0,26,0,31,32,0); +$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,25,0,26); // Name of SQL tables of dictionaries $tabname=array(); @@ -112,8 +112,6 @@ $tabname[27]= MAIN_DB_PREFIX."c_stcomm"; $tabname[28]= MAIN_DB_PREFIX."c_holiday_types"; $tabname[29]= MAIN_DB_PREFIX."c_lead_status"; $tabname[30]= MAIN_DB_PREFIX."c_format_cards"; -$tabname[31]= MAIN_DB_PREFIX."accounting_system"; -$tabname[32]= MAIN_DB_PREFIX."c_accountancy_category"; // Dictionary labels $tablib=array(); @@ -147,8 +145,6 @@ $tablib[27]= "DictionaryProspectStatus"; $tablib[28]= "DictionaryHolidayTypes"; $tablib[29]= "DictionaryOpportunityStatus"; $tablib[30]= "DictionaryFormatCards"; -$tablib[31]= "DictionaryAccountancysystem"; -$tablib[32]= "DictionaryAccountancyCategory"; // Requests to extract data $tabsql=array(); @@ -182,8 +178,6 @@ $tabsql[27]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREF $tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newByMonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid"; $tabsql[29]= "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status"; $tabsql[30]= "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards"; -$tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, c.code as country_code, c.label as country, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_country as c WHERE s.fk_pays=c.rowid and c.active=1"; -$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range, a.position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accountancy_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1"; // Criteria to sort dictionaries $tabsqlsort=array(); @@ -217,8 +211,6 @@ $tabsqlsort[27]="code ASC"; $tabsqlsort[28]="country ASC, code ASC"; $tabsqlsort[29]="position ASC"; $tabsqlsort[30]="code ASC"; -$tabsqlsort[31]="pcg_version ASC"; -$tabsqlsort[32]="code ASC, label ASC"; // Nom des champs en resultat de select pour affichage du dictionnaire $tabfield=array(); @@ -252,8 +244,6 @@ $tabfield[27]= "code,libelle"; $tabfield[28]= "code,label,affect,delay,newByMonth,country_id,country"; $tabfield[29]= "code,label,percent,position"; $tabfield[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y"; -$tabfield[31]= "pcg_version,country_id,country,label"; -$tabfield[32]= "code,label,range,position,country_id,country"; // Nom des champs d'edition pour modification d'un enregistrement $tabfieldvalue=array(); @@ -287,8 +277,6 @@ $tabfieldvalue[27]= "code,libelle"; $tabfieldvalue[28]= "code,label,affect,delay,newByMonth,country"; $tabfieldvalue[29]= "code,label,percent,position"; $tabfieldvalue[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y"; -$tabfieldvalue[31]= "pcg_version,country,label"; -$tabfieldvalue[32]= "code,label,range,position,country"; // Nom des champs dans la table pour insertion d'un enregistrement $tabfieldinsert=array(); @@ -322,8 +310,6 @@ $tabfieldinsert[27]= "code,libelle"; $tabfieldinsert[28]= "code,label,affect,delay,newByMonth,fk_country"; $tabfieldinsert[29]= "code,label,percent,position"; $tabfieldinsert[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y"; -$tabfieldinsert[31]= "pcg_version,fk_pays,label"; -$tabfieldinsert[32]= "code,label,range,position,fk_country"; // Nom du rowid si le champ n'est pas de type autoincrement // Example: "" if id field is "rowid" and has autoincrement on @@ -359,8 +345,6 @@ $tabrowid[27]= "id"; $tabrowid[28]= ""; $tabrowid[29]= ""; $tabrowid[30]= ""; -$tabrowid[31]= ""; -$tabrowid[32]= ""; // Condition to show dictionary in setup page $tabcond=array(); @@ -394,8 +378,6 @@ $tabcond[27]= ! empty($conf->societe->enabled); $tabcond[28]= ! empty($conf->holiday->enabled); $tabcond[29]= ! empty($conf->projet->enabled); $tabcond[30]= ! empty($conf->label->enabled); -$tabcond[31]= ! empty($conf->accounting->enabled); -$tabcond[32]= ! empty($conf->accounting->enabled); // List of help for fields $tabhelp=array(); @@ -429,8 +411,6 @@ $tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$langs->trans("MinimumNoticePeriod"), 'newByMonth'=>$langs->trans("NbAddedAutomatically")); $tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList")); $tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize")); -$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode")); -$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode")); // List of check for fields (NOT USED YET) $tabfieldcheck=array(); @@ -464,8 +444,6 @@ $tabfieldcheck[27] = array(); $tabfieldcheck[28] = array(); $tabfieldcheck[29] = array(); $tabfieldcheck[30] = array(); -$tabfieldcheck[31] = array(); -$tabfieldcheck[32] = array(); // Complete all arrays with entries found into modules complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck); @@ -482,7 +460,6 @@ if ($id == 11) $langs->load("propal"); $langs->load("bills"); $langs->load("interventions"); - $langs->load("accountancy"); $elementList = array( '' => '', 'societe' => $langs->trans('ThirdParty'), @@ -557,7 +534,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $ok=1; foreach ($listfield as $f => $value) { - if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType','DictionaryHolidayTypes','DictionaryRevenueStamp','DictionaryAccountancysystem','DictionaryAccountancyCategory'))) continue; // For some pages, country is not mandatory + if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType','DictionaryHolidayTypes','DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType','DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue; if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; @@ -873,7 +850,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); } //var_dump($elementList); @@ -975,7 +952,6 @@ if ($id) if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); } if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); } if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); } - if ($fieldlist[$field]=='range') { $valuetoshow=$langs->trans("Range"); } if ($id == 2) // Special cas for state page { @@ -1143,7 +1119,6 @@ if ($id) if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); } if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); } if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); } - if ($fieldlist[$field]=='range') { $valuetoshow=$langs->trans("Range"); } // Affiche nom du champ if ($showfield) @@ -1595,7 +1570,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm' || $fieldlist[$field] == 'deductible') { print ''; - print Form::selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1); + print $form->selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1); print ''; } elseif (in_array($fieldlist[$field],array('nbjour','decalage','taux','localtax1','localtax2'))) { diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index bb5058c8b03..b3f1d7a5d51 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -744,7 +744,7 @@ print ''; print ''; print $langs->trans("ForceInvoiceDate"); print ''; -print Form::selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); +print $form->selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); print ''; print ''; print "\n"; @@ -758,7 +758,7 @@ print ''; print ''; print $langs->trans("JSOnPaimentBill"); print ''; -print Form::selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); +print $form->selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); print ''; print ''; print "\n"; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index eae46e76893..51d0a6174c8 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -170,7 +170,7 @@ if ($action == 'edit') // Edit // Multilangual GUI $var=!$var; print ''.$langs->trans("EnableMultilangInterface").''; - print Form::selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1); + print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1); print ''; print ' '; print ''; @@ -191,7 +191,7 @@ if ($action == 'edit') // Edit { $var=!$var; print ''.$searchformtitle[$key].''; - print Form::selectyesno($searchform[$key],$searchformconst[$key],1); + print $form->selectyesno($searchform[$key],$searchformconst[$key],1); print ''; } print ''; @@ -207,7 +207,7 @@ if ($action == 'edit') // Edit // Show logo $var=!$var; print ''.$langs->trans("EnableShowLogo").''; - print Form::selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1); + print $form->selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1); print ''; print ' '; print ''; @@ -227,7 +227,7 @@ if ($action == 'edit') // Edit // Disable javascript and ajax $var=!$var; print ''.$langs->trans("DisableJavascript").''; - print Form::selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1); + print $form->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1); print ''; print ' '; print ''; @@ -237,7 +237,7 @@ if ($action == 'edit') // Edit { $var=!$var; print ''.$langs->trans("UsePreviewTabs").''; - print Form::selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); + print $form->selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); print ''; print ' '; print ''; @@ -279,7 +279,7 @@ if ($action == 'edit') // Edit // Hide unauthorized button $var=!$var; print ''.$langs->trans("ButtonHideUnauthorized").''; - print Form::selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1); + print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1); print ''; print ' '; print ''; @@ -287,7 +287,7 @@ if ($action == 'edit') // Edit // Hide helpcenter link on login page $var=!$var; print ''.$langs->trans("DisableLinkToHelpCenter").''; - print Form::selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); + print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); print ''; print ' '; print ''; @@ -295,7 +295,7 @@ if ($action == 'edit') // Edit // Hide wiki link on login page $var=!$var; print ''.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).''; - print Form::selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); + print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); print ''; print ' '; print ''; @@ -303,7 +303,7 @@ if ($action == 'edit') // Edit // Show bugtrack link $var=!$var; print ''.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; - print Form::selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); + print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); print ''; print ' '; print ''; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index b24d3e02111..52324dc1678 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -343,7 +343,7 @@ if ($action == 'edit') // Disable $var=!$var; print ''.$langs->trans("MAIN_DISABLE_ALL_MAILS").''; - print Form::selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); + print $form->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); print ''; // Separator @@ -482,7 +482,7 @@ if ($action == 'edit') { if (function_exists('openssl_open')) { - print Form::selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1); + print $form->selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -496,7 +496,7 @@ if ($action == 'edit') { if (function_exists('openssl_open')) { - print Form::selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 15b47d5efe8..7da0673b196 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -249,7 +249,7 @@ if ($action == 'delete') $result = $db->query($sql); $obj = $db->fetch_object($result); - print Form::formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete"); + print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete"); } diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 7012aebfda3..b1ad347d8b7 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -173,7 +173,7 @@ print ''; print ''; print ''; print ''; -print Form::selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); +print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); print ''; print ''; print ''; @@ -186,7 +186,7 @@ print ''; print '
'; print ''; print ''; -print Form::selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); +print $form->selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); print ''; print '
'; print ''; @@ -199,7 +199,7 @@ print ''; print '
'; print ''; print ''; -print Form::selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); +print $form->selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); print ''; print '
'; print ''; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 429b6003a44..3b968af09c3 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -139,7 +139,7 @@ if ($action == 'edit') // Edit // Hide VAT Intra on address $var=!$var; print ''.$langs->trans("ShowVATIntaInAddress").''; - print Form::selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); + print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); print ''; // Show prof id 1 in address into pdf @@ -156,7 +156,7 @@ if ($action == 'edit') // Edit if ($pid1) { print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid1.''; - print Form::selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); + print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); print ''; } @@ -174,7 +174,7 @@ if ($action == 'edit') // Edit if ($pid2) { print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid2.''; - print Form::selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); + print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); print ''; } @@ -192,7 +192,7 @@ if ($action == 'edit') // Edit if ($pid3) { print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid3.''; - print Form::selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); + print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); print ''; } @@ -210,7 +210,7 @@ if ($action == 'edit') // Edit if ($pid4) { print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid4.''; - print Form::selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); + print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); print ''; } @@ -227,31 +227,31 @@ if ($action == 'edit') // Edit // Hide any PDF informations $var=!$var; print ''.$langs->trans("HideAnyVATInformationOnPDF").''; - print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); + print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); print ''; //Desc $var=!$var; print ''.$langs->trans("HideDescOnPDF").''; - print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); + print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); print ''; //Ref $var=!$var; print ''.$langs->trans("HideRefOnPDF").''; - print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); + print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); print ''; //Details $var=!$var; print ''.$langs->trans("HideDetailsOnPDF").''; - print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); + print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); print ''; // Place customer adress to the ISO location $var=!$var; print ''.$langs->trans("PlaceCustomerAddressToIsoLocation").''; - print Form::selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); + print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 20c09360edb..b4f1fe67e0b 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -565,7 +565,7 @@ print ''; -print Form::selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); +print $form->selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); print ''; print ''; print "\n"; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 1a9eebcaf70..1f6e45223b4 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -158,7 +158,7 @@ print ''; print ''.$langs->trans("MAIN_PROXY_USE").''; print ''; print ''; -print Form::selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); +print $form->selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); print ''; print ''; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 7943db2fbb4..05fe548daff 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -177,7 +177,7 @@ if ($action == 'edit') // Disable $var=!$var; print ''.$langs->trans("MAIN_DISABLE_ALL_SMS").''; - print Form::selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); + print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print ''; // Separator diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 8613c99e04a..98ff43360a8 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -150,7 +150,7 @@ if (! empty($conf->facture->enabled)) print "
"; print ''; print ""; - print Form::selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); + print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); print ''; print "
\n"; } @@ -170,7 +170,7 @@ if (! empty($conf->commande->enabled)) print "
"; print ''; print ""; - print Form::selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); + print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); print ''; print "
\n"; } @@ -192,7 +192,7 @@ if (! empty($conf->expedition->enabled)) print "
"; print ''; print ""; - print Form::selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); + print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); print ''; print "
\n"; } @@ -234,7 +234,7 @@ if (! empty($conf->fournisseur->enabled)) print "
"; print ''; print ""; - print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); + print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); print ''; print "
\n"; } @@ -255,7 +255,7 @@ if (! empty($conf->fournisseur->enabled)) print "
"; print ''; print ""; - print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); + print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); print ''; print "
\n"; } @@ -275,7 +275,7 @@ if (! empty($conf->fournisseur->enabled)) print "
"; print ''; print ""; - print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); + print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); print ''; print "
\n"; } @@ -314,7 +314,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "
"; print ''; print ""; - print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1); + print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1); print ''; print '
'; print "\n"; @@ -329,7 +329,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "
"; print ''; print ""; - print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1); + print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1); print ''; print '
'; print "\n"; @@ -344,7 +344,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "
"; print ''; print ""; - print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1); + print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1); print ''; print '
'; print "\n"; @@ -373,7 +373,7 @@ if ($virtualdiffersfromphysical) print "
"; print ''; print ""; - print Form::selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1); + print $form->selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1); print ''; print '
'; print "\n"; @@ -399,7 +399,7 @@ print ''; print "
"; print ''; print ""; -print Form::selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); +print $form->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); print ''; print '
'; print "\n"; @@ -419,7 +419,7 @@ if ($conf->global->PRODUIT_SOUSPRODUITS) print "
"; print ''; print ""; - print Form::selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1); + print $form->selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1); print ''; print '
'; print "\n"; diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index beb92688ad5..4ba759a66fa 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -180,7 +180,7 @@ if ($result) if ($action == 'purge') { $formquestion=array(); - print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1); } print '
'; @@ -198,7 +198,7 @@ if ($result) // Lignes des champs de filtres print ''; - print ''.Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1).''; + print ''.$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).$form->select_date($date_end,'date_end',0,0,0,'',1,0,1).''; print ''; print ''; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 0d0f10e9bc8..c313c91a7bd 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -116,12 +116,12 @@ print '
'; if ($action == 'purge') { $formquestion=array(); - print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); + print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); } else if ($action == 'lock') { $formquestion=array(); - print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); } if ($savehandler == 'files') diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index f0e62f65998..170c37a79bf 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -108,7 +108,7 @@ if (preg_match('/^confirm/i',$choice)) { print '
'; $formquestion=array(); - print Form::formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); + print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); } diff --git a/htdocs/admin/websites.php b/htdocs/admin/websites.php index 80a5b440a24..de4c0472f62 100644 --- a/htdocs/admin/websites.php +++ b/htdocs/admin/websites.php @@ -321,7 +321,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); } //var_dump($elementList); diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index c6c7548b851..de60e8b80cf 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -132,7 +132,7 @@ if (! empty($conf->stock->enabled)) print ''.$langs->trans("CashDeskDoNotDecreaseStock").''; // Force warehouse (this is not a default value) print ''; if (empty($conf->productbatch->enabled)) { - print Form::selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1); + print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1); } else { @@ -166,7 +166,7 @@ if (! empty($conf->service->enabled)) print ''; print $langs->trans("CashdeskShowServices"); print ''; - print Form::selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); + print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); print "\n"; } @@ -177,7 +177,7 @@ if (! empty($conf->receiptprinter->enabled)) print ''; print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("FeatureNotYetAvailable").')'; print ''; - print Form::selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); + print $form->selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); print "\n"; } diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 92db0df15fb..ecb11c3e6ee 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -43,10 +43,10 @@ $langs->load("cashdesk"); + onchange="javascript: setSource('REF');" + onkeyup="javascript: verifResultat('resultats_dhtml', this.value, global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);" + onfocus="javascript: this.select(); verifResultat('resultats_dhtml', this.value, global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);" + onBlur="javascript: document.getElementById('resultats_dhtml').innerHTML = '';"/> load("cashdesk"); */ ?> - '.$top_liste_produits.''."\n"; @@ -93,7 +93,7 @@ $langs->load("cashdesk");
-
+ @@ -106,7 +106,7 @@ $langs->load("cashdesk"); - @@ -115,10 +115,10 @@ $langs->load("cashdesk"); - + - @@ -126,7 +126,7 @@ $langs->load("cashdesk"); - @@ -201,10 +201,10 @@ $langs->load("cashdesk"); print '
'; print '
'; ?> - " onclick="verifClic('DIF');" /> + " onclick="javascript: verifClic('DIF');" /> trans("DateEcheance").' :'; - print Form::selectDate(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); + print $form->select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); print '
'; ?>
diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index cf582ba749a..1775c14767d 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -248,7 +248,7 @@ if ($socid) print '
trans("Qty"); ?>trans("VATRate"); ?>
+ + - tva(); // Try to get a previously entered VAT rowid. First time, this will return empty. @@ -151,7 +151,7 @@ $langs->load("cashdesk"); - +
trans("Amount"); ?> @@ -161,7 +161,7 @@ $langs->load("cashdesk");
+
'; print ''; // Alias names (commercial, trademark or alias names) @@ -358,7 +358,7 @@ else if ($id || $ref) // Ref print ""; print ''; print ''; @@ -418,7 +418,7 @@ else if ($id || $ref) // Ref print ''; print ''; // Login @@ -492,7 +492,7 @@ else if ($id || $ref) // Ref print ''; print ''; // Name diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 6560c0a6ed6..f3a84eed5d5 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -108,7 +108,7 @@ if ($object->id) */ if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); } print($mesg); diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index a72f8a803f3..a1486ff344f 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -182,7 +182,7 @@ dol_fiche_head($head, 'card', $title, 0, 'category'); if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); } print '
'.$langs->trans("ThirdPartyName").''; - print Form::showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type); + print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($product,'ref','',1,'ref'); + print $form->showrefnav($product,'ref','',1,'ref'); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($member,'id','','1','rowid','ref','','&type='.$type); + print $form->showrefnav($member,'id','','1','rowid','ref','','&type='.$type); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object,'rowid'); + print $form->showrefnav($object,'rowid'); print '
'; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 0ae79ff88f2..19633aa13d7 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -665,9 +665,9 @@ if ($action == 'create') $datep=($datep?$datep:$object->datep); if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0); print ''; // Date end @@ -678,9 +678,9 @@ if ($action == 'create') $datef=dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h'); } print ''; // Status @@ -893,7 +893,7 @@ if ($id > 0) // Confirmation suppression action if ($action == 'delete') { - print Form::formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); + print $form->formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); } if ($action == 'edit') @@ -955,16 +955,16 @@ if ($id > 0) // Date start print ''; // Date end print ''; $userepeatevent=0; // Dev in progress @@ -1168,7 +1168,7 @@ if ($id > 0) // Clone event if($action == 'clone') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); print $formconfirm; } @@ -1180,7 +1180,7 @@ if ($id > 0) // Ref print ''; // Type diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 349a94511ed..992c2314446 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -130,7 +130,7 @@ if ($object->id > 0) // Ref print ''; // Type diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 1ad1374da6a..ed8227a1cb8 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -142,7 +142,7 @@ $form=new Form($db); $userstatic=new User($db); $nav=''; -$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $now=dol_now(); @@ -320,10 +320,10 @@ if ($resql) //print ''; } print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index f0b5df726fe..28a531c6b28 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -261,7 +261,7 @@ $nav.=''; $nav.=''; $nav.=''; -$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $nav.=''; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index aa588d7a837..621d3ada57a 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -264,7 +264,7 @@ $nav.=''; $nav.=''; $nav.=''; -$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $nav.=''; diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index 18341fbeaef..edb5042e358 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -413,7 +413,7 @@ else // Confirmation delete if ($action == 'delete') { - print Form::formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete"); + print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete"); } $nblines = count($object->lines); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index a687b9a814d..3988a986f67 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -255,9 +255,9 @@ if ($id > 0) print ''; print ''; print ''; } @@ -371,10 +371,10 @@ if ($id > 0) { print ''; print ''; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 3f5ac72355b..9a7d0349f41 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -726,17 +726,17 @@ else // Confirmation de la validation du mailing if ($action == 'valid') { - print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); } // Confirm reset else if ($action == 'reset') { - print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); } // Confirm delete else if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); } @@ -783,7 +783,7 @@ else } $text.=$langs->trans('ConfirmSendingEmailing').'
'; $text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); } } @@ -793,22 +793,22 @@ else print ''; print ''; // Description - print ''; // From - print ''; // Errors to - print ''; // Status @@ -864,7 +864,7 @@ else array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers"), 'value' => 0) ); // Paiement incomplet. On demande si motif = escompte ou autre - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240); } /* diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 3ed0098bed5..0c133fac6df 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -184,7 +184,7 @@ if ($object->fetch($id) >= 0) print ''; print ''; print ''; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 606e85b71ac..b12e8004bc4 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1368,7 +1368,7 @@ if ($action == 'create') // Date print ''; // Validaty duration @@ -1416,9 +1416,9 @@ if ($action == 'create') $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); $sday = date("d", $tmpdte); - Form::selectDate($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); + $form->select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); } else { - Form::selectDate(-1, 'date_livraison', '', '', '', "addprop", 1, 1); + $form->select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1); } print ''; @@ -1671,22 +1671,22 @@ if ($action == 'create') // 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Confirm delete else if ($action == 'delete') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen else if ($action == 'reopen') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line else if ($action == 'ask_deleteline') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate proposal @@ -1714,7 +1714,7 @@ if ($action == 'create') } if (! $error) - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); } if (! $formconfirm) { @@ -1733,7 +1733,7 @@ if ($action == 'create') // Ref print ''; // Ref customer @@ -1804,7 +1804,7 @@ if ($action == 'create') print ''; print ''; print ''; - Form::selectDate($object->date, 're', '', '', 0, "editdate"); + $form->select_date($object->date, 're', '', '', 0, "editdate"); print ''; print ''; } else { @@ -1830,7 +1830,7 @@ if ($action == 'create') print ''; print ''; print ''; - Form::selectDate($object->fin_validite, 'ech', '', '', '', "editecheance"); + $form->select_date($object->fin_validite, 'ech', '', '', '', "editecheance"); print ''; print ''; } else { @@ -1865,9 +1865,9 @@ if ($action == 'create') // Delivery date $langs->load('deliveries'); print ''; print ''; diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index d3373ff92d8..cdeacefafe1 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -73,7 +73,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index d85768170d0..544c5ab27e3 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -161,7 +161,7 @@ if ($object->id > 0) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 858e4e1c34b..af603d0606b 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -106,7 +106,7 @@ if ($object->id > 0) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index cff7e9c313e..1e5ace7353e 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; // Ref client diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index a9445743e0e..07989b457de 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -296,7 +296,7 @@ if ($socid > 0) if ($_GET['action'] == 'remove') { - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); } /* @@ -403,7 +403,7 @@ if ($socid > 0) array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') ); $langs->load("dict"); - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); } } else diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 712ef0fbc86..1ec3a0533cc 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -70,7 +70,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; // Ref cde client diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index f1f609dcc9f..da8b9012b14 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1505,7 +1505,7 @@ if ($action == 'create' && $user->rights->commande->creer) } // Date print ''; // Delivery date planed @@ -1515,7 +1515,7 @@ if ($action == 'create' && $user->rights->commande->creer) if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY)?-1:''; } - Form::selectDate($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); + $form->select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); print ""; // Conditions de reglement @@ -1775,7 +1775,7 @@ if ($action == 'create' && $user->rights->commande->creer) * Confirmation de la suppression de la commande */ if ($action == 'delete') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); } /* @@ -1825,7 +1825,7 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockDecrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); } // Confirm back to draft status @@ -1857,14 +1857,14 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); } /* * Confirmation de la cloture */ if ($action == 'shipped') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); } /* @@ -1898,13 +1898,13 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); } // Confirmation to delete line if ($action == 'ask_deleteline') { - $formconfirm=Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Clone confirmation @@ -1918,7 +1918,7 @@ if ($action == 'create' && $user->rights->commande->creer) // => 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) { @@ -1951,7 +1951,7 @@ if ($action == 'create' && $user->rights->commande->creer) // Ref print ''; print ''; print ''; @@ -2047,7 +2047,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; - Form::selectDate($object->date, 'order_', '', '', '', "setdate"); + $form->select_date($object->date, 'order_', '', '', '', "setdate"); print ''; print ''; } else { @@ -2072,7 +2072,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; - Form::selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); + $form->select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); print ''; print ''; } else { diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 53fcd5d9a57..c72e040e61c 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -156,7 +156,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '"; // Ref commande client diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 1c4c7b8b8cb..2d9c80e9d2d 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -110,7 +110,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; print ''; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index aaa1082398f..91a602c31a6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -403,11 +403,11 @@ if ($resql) if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { print ''; } print ''; print "\n"; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 17ca75b8e80..6f3519e9ced 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '"; // Ref commande client diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 08700147cab..ebb9bedca2c 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -427,7 +427,7 @@ if ($action == 'create' && !$error) // Date invoice print ''; // Payment term print ''; print ''; // Label @@ -404,7 +404,7 @@ if ($id > 0 || ! empty($ref)) if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteTransaction'); - print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); } @@ -466,7 +466,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; print ''; @@ -539,7 +539,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; print "\n"; diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 97edaf5446f..7b53d775cb6 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -150,7 +150,7 @@ if ($_GET["account"]) { if (! preg_match('/,/', $id)) { - print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref'); + print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); } else { diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 1288021d470..b33b0438552 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -365,7 +365,7 @@ if ($action == 'create') print ''; print ''; print ''; @@ -558,7 +558,7 @@ else */ if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); } @@ -569,7 +569,7 @@ else // Ref print ''; print ''; // Label diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 151257a6535..3b6957df40f 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -179,7 +179,7 @@ if ($id > 0 || !empty($ref)) { // Ref print ''; print ''; // Label @@ -200,7 +200,7 @@ if ($id > 0 || !empty($ref)) { * Confirmation suppression fichier */ if ($action == 'delete') { - $ret = $formForm::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), + $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index fb8a823b96e..0764c87f5ab 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -770,7 +770,7 @@ if ($account) if ($_GET["option"]!='all') { $morehtml=''.$langs->trans("ShowAllAccounts").''; - print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam); + print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam); } else { diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 502fdf7d36c..a17614238be 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -259,7 +259,7 @@ if ($result) // Confirmations if ($action == 'delete_categ') { - print Form::formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1); + print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1); } @@ -276,7 +276,7 @@ if ($result) // Ref print '"; print ''; print ''; @@ -451,7 +451,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; } else @@ -467,7 +467,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; print ''; // Label diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 47a24e91666..f86ac81aa76 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -191,9 +191,9 @@ if ($resql) $moreforfilter = ''; $moreforfilter.='
'; $moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' '; - $moreforfilter .= Form::selectDate($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= ' - '; - $moreforfilter .= $langs->trans('EndDate') . ' ' . Form::selectDate($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= '
'; if ($moreforfilter) @@ -238,7 +238,7 @@ if ($resql) print ''; print ''; print ''; print "\n"; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index a60c470993d..db7f37cb3e5 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -97,7 +97,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) // Ref print ''; print ''; // Label diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index 403574b04d0..146ed4759c4 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -177,7 +177,7 @@ $form->select_comptes($account_to,'account_to',0,'',1); print "\n"; print "\n"; print ''; print ''; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 930684a2e69..934c970accf 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -262,7 +262,7 @@ if ($action == 'create') print ""; print ''; // Km @@ -358,7 +358,7 @@ else if ($id) // Date print ''; // Km @@ -416,7 +416,7 @@ else if ($id) */ if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); } @@ -429,16 +429,16 @@ else if ($id) // Ref print ''; $form->load_cache_types_fees(); // Type print ''; // Who @@ -450,16 +450,16 @@ else if ($id) // Date print ''; // Km/Price print '"; // Where diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 80f49fec401..b6b1cbfa277 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -108,7 +108,7 @@ if ($object->id) // Ref print ''; // Societe diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 8767ca97961..497de98fa72 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -165,7 +165,7 @@ if ($resql) // print ''; print ''; print ''; print "\n"; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 00e5d0f9ccc..7298eb18135 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2354,7 +2354,7 @@ if ($action == 'create') // Date invoice print ''; // Payment term @@ -2548,12 +2548,12 @@ if ($action == 'create') print ''; print '
'.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) Form::selectDate($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) Form::selectDate($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); - else Form::selectDate($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); + else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '
'.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print '
'.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) Form::selectDate($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); - else if (GETPOST("afaire") == 2) Form::selectDate($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); - else Form::selectDate($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) $form->select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); + else if (GETPOST("afaire") == 2) $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + else $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '
'.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - //else Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); - else Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + //else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); + else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '
'; - print Form::selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); + print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print ''; - print Form::selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); + print $form->select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); print '
'; - print Form::editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); + print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); print ''; - print Form::editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); + print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); print '
'; - print Form::editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); + print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount'; - print Form::editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); + print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); if (empty($object->outstanding_limit)) print $langs->trans("NoLimit"); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object,'id', $linkback); + print $form->showrefnav($object,'id', $linkback); print '
'.Form::editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print Form::editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.$form->editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print $form->editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.Form::editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print Form::editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.Form::editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print Form::editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object,'id', $linkback); + print $form->showrefnav($object,'id', $linkback); print '
'.$langs->trans("MailTitle").''.$object->titre.'
' . $langs->trans('Date') . ''; - Form::selectDate('', '', '', '', '', "addprop", 1, 1); + $form->select_date('', '', '', '', '', "addprop", 1, 1); print '
' . $langs->trans('Ref') . ''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
'; - print Form::editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); + print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); print ''; - print Form::editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); + print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); print '
' . $langs->trans('Ref') . ''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
'.$langs->trans('Ref').''; - print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '
'.$langs->trans('Ref').''; - print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '
'.$langs->trans('Ref').''; - print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '
' . $langs->trans('Ref') . ''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
' . $langs->trans('Date') . ''; - Form::selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date + $form->select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print '
' . $langs->trans('Ref') . ''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "
'.$langs->trans('Ref').''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '
'.$langs->trans('Company').''.$object->thirdparty->getNomUrl(1).'
'; - print Form::selectyesno('billed', $billed, 1, 0, 1); + print $form->selectyesno('billed', $billed, 1, 0, 1); print ''; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "
'.$langs->trans('Date').''; - Form::selectDate('','','','','',"add",1,1); + $html->select_date('','','','','',"add",1,1); print '
'.$langs->trans('PaymentConditionsShort').''; @@ -575,8 +575,8 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $num = $db->num_rows($resql); print load_fiche_titre($title); $i = 0; - $period=Form::selectDate($date_start,'date_start',0,0,1,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,1,'',1,0,1); - $periodely=Form::selectDate($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.Form::selectDate($date_endy,'date_end_dely',0,0,1,'',1,0,1); + $period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1); + $periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1); if (! empty($socid)) { diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 7919f074d41..b1bf6cd4270 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -341,7 +341,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref'); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); print '
'; - Form::selectDate($dateop,'op',0,0,0,'transaction'); + $form->select_date($dateop,'op',0,0,0,'transaction'); print ''; $form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')),'operation','1,2',2,1); @@ -521,9 +521,9 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - $period_filter .= $langs->trans('From').' '.Form::selectDate($req_stdt,'req_stdt',0,0,1,null,1,1,1); + $period_filter .= $langs->trans('From').' '.$form->select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1); $period_filter .= ' '; - $period_filter .= $langs->trans('to').' '.Form::selectDate($req_enddt,'req_enddt',0,0,1,null,1,1,1); + $period_filter .= $langs->trans('to').' '.$form->select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1); print '
'.$period_filter.' '; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'.$langs->trans("Date").''; - Form::selectDate('', 're', 0, 0, 0, 'formsoc'); + $form->select_date('', 're', 0, 0, 0, 'formsoc'); print '
'.$langs->trans("BalanceMinimalAllowed").'
'.$langs->trans("Ref").''; - print Form::showrefnav($account, 'ref', $linkback, 1, 'ref'); + print $form->showrefnav($account, 'ref', $linkback, 1, 'ref'); print '
' . $langs->trans("Ref") . ''; - print Form::showrefnav($object, 'ref', '', 1, 'ref'); + print $form->showrefnav($object, 'ref', '', 1, 'ref'); print '
'.$langs->trans("Ref")."'; - print Form::showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid'); + print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid'); print '
'; - print Form::selectDate($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); + print $form->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); print ''; - print Form::selectDate($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); + print $form->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); if (! $objp->rappro) { print '   '; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 9cf6b3fe2af..8ef53f26203 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -131,7 +131,7 @@ if (empty($num)) // Ref print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref'); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); print '
'; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'.$langs->trans("Ref").''; - print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref'); + print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); print '
"; -Form::selectDate((! empty($dateo)?$dateo:''),'','','','','add'); +$form->select_date((! empty($dateo)?$dateo:''),'','','','','add'); print "
'.$langs->trans("Date").''; - print Form::selectDate($datec?$datec:-1,'','','','','add',1,1,1); + print $form->select_date($datec?$datec:-1,'','','','','add',1,1,1); print '
'.$langs->trans("Date").''; - print Form::selectDate($object->date,'',0,0,0,'update',1,0,1); + print $form->select_date($object->date,'',0,0,0,'update',1,0,1); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
'; - print Form::editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print ''; - print Form::editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print $form->editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print '
'; - print Form::editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); + print $form->editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); print ''; - print Form::editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); + print $form->editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); print '
'; - print Form::editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ''; - print Form::editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print "
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
'; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
' . $langs->trans('Date') . ''; $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - print Form::selectDate($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); + print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); print '
'; print $langs->trans('From') . ' '; print ''; - print Form::selectDate('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); + print $form->select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); print '
'; print $langs->trans('to') . ' '; print ''; - print Form::selectDate('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); + print $form->select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); print '
'; print ''; } @@ -2664,7 +2664,7 @@ else if ($id > 0 || ! empty($ref)) // Confirmation de la conversion de l'avoir en reduc if ($action == 'converttoreduc') { $text = $langs->trans('ConfirmConvertToReduc'); - $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); } // Confirmation to delete invoice @@ -2692,9 +2692,9 @@ else if ($id > 0 || ! empty($ref)) // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' // => 1), array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction")))); - $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); } else { - $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); } } @@ -2758,7 +2758,7 @@ else if ($id > 0 || ! empty($ref)) { $text .= '
' . img_warning() . ' ' . $langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); } - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); } // Confirm back to draft status @@ -2795,12 +2795,12 @@ else if ($id > 0 || ! empty($ref)) array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $value)); } - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); } // Confirmation du classement paye if ($action == 'paid' && $resteapayer <= 0) { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); } if ($action == 'paid' && $resteapayer > 0) { // Code @@ -2829,7 +2829,7 @@ else if ($id > 0 || ! empty($ref)) // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); } // Confirmation du classement abandonne @@ -2860,13 +2860,13 @@ else if ($id > 0 || ! empty($ref)) // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); - $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); } } // Confirmation de la suppression d'une ligne produit if ($action == 'ask_deleteline') { - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); } // Clone confirmation @@ -2878,7 +2878,7 @@ else if ($id > 0 || ! empty($ref)) // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company($object->socid, 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) @@ -2910,7 +2910,7 @@ else if ($id > 0 || ! empty($ref)) if ($result < 0) { dol_print_error('', $discount->error); } - print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer @@ -3091,7 +3091,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editinvoicedate') { - Form::formDate($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); + $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); } else { print dol_print_date($object->date, 'daytext'); } @@ -3454,7 +3454,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editpaymentterm') { - Form::formDate($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); + $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); } else { print dol_print_date($object->date_lim_reglement, 'daytext'); if ($object->hasDelay()) { diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index c2d7143fe44..1172769e95a 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref)) if ($result < 0) { dol_print_error('', $discount->error); } - print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index e6e474883f4..b07a8f8c2d4 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -159,7 +159,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 18e0fac540a..e4f9846309a 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 9411d1fb01b..e833c0629b3 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -349,7 +349,7 @@ if ($action == 'create') // First date of execution for cron print "".$langs->trans('NextDateToExecution').""; $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); - print Form::selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); + print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); print ""; // Number max of generation @@ -609,7 +609,7 @@ else if ($result < 0) { dol_print_error('', $discount->error); }*/ - print Form::showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref); + print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref); print ''; @@ -669,9 +669,9 @@ else print ''; - print Form::editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer); + print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer); print ''; - print Form::editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60'); + print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60'); print ''; print ''; @@ -771,7 +771,7 @@ else print ''; if ($action == 'date_when' || $object->frequency > 0) { - print Form::editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); + print $form->editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } else { @@ -780,7 +780,7 @@ else print ''; if ($action == 'date_when' || $object->frequency > 0) { - print Form::editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); + print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } print ''; print ''; @@ -789,7 +789,7 @@ else print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print Form::editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); + print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); } else { @@ -798,7 +798,7 @@ else print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print Form::editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); + print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); } else { @@ -810,14 +810,14 @@ else // Status of generated invoices print ''; if ($action == 'auto_validate' || $object->frequency > 0) - print Form::editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); + print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); else print $langs->trans("StatusOfGeneratedInvoices"); print ''; $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) { - print Form::editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select); + print $form->editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select); } print ''; print ''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index c204d908a3f..d227d127f69 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -719,7 +719,7 @@ if ($resql) if ($show_files) $param.='&show_files=' .$show_files; $param.=(! empty($option)?"&option=".$option:""); - $massactionbutton=Form::selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); + $massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); $i = 0; print '
'."\n"; @@ -924,7 +924,7 @@ if ($resql) print $form->selectarray('search_status', $liststatus, $search_status, 1); print ''; print ''; - $searchpitco=Form::showFilterAndCheckAddButtons(1, 'checkforselect', 1); + $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 7d2cd530955..3562a235963 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index a3302f3f18e..00254b7440f 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -167,7 +167,7 @@ if ($object->id > 0) { dol_print_error('',$discount->error); } - print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ""; // Ref customer @@ -300,7 +300,7 @@ if ($object->id > 0) { if ($action == 'editinvoicedate') { - Form::formDate($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate'); + $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate'); } else { @@ -351,7 +351,7 @@ if ($object->id > 0) { if ($action == 'editpaymentterm') { - Form::formDate($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm'); + $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm'); } else { diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index bd219b171a7..b8a5779c708 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -92,7 +92,7 @@ $builddate=time(); $description=$langs->trans("DescPurchasesJournal").'
'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); -$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); +$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 68df0cd964e..0cbd5068077 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -96,7 +96,7 @@ $builddate=time(); $description=$langs->trans("DescSellsJournal").'
'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); -$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); +$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 6c479a4d9f6..566a2ff53cc 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -19,7 +19,7 @@ /** * \file htdocs/compta/localtax/card.php * \ingroup tax - * \brief Page of second or third tax payments (like IRPF for spain, ...) + * \brief Page of IRPF payments */ require '../../main.inc.php'; @@ -30,25 +30,17 @@ $langs->load("compta"); $langs->load("banks"); $langs->load("bills"); -$id=GETPOST("id",'int'); -$action=GETPOST("action","alpha"); -$refund=GETPOST("refund","int"); -if (empty($refund)) $refund=0; - +$id=$_REQUEST["id"]; $lttype=GETPOST('localTaxType', 'int'); +$mesg = ''; // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); -$localtax = new Localtax($db); -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('localtaxvatcard','globalcard')); - - -/** +/* * Actions */ @@ -58,8 +50,9 @@ if($_POST["cancel"] == $langs->trans("Cancel")){ exit; } -if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) +if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) { + $localtax = new Localtax($db); $db->begin(); @@ -90,9 +83,10 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) } //delete payment of localtax -if ($action == 'delete') +if ($_GET["action"] == 'delete') { - $result=$localtax->fetch($id); + $localtax = new Localtax($db); + $result=$localtax->fetch($_GET['id']); if ($localtax->rappro == 0) { @@ -105,10 +99,10 @@ if ($action == 'delete') { $accountline=new AccountLine($db); $result=$accountline->fetch($localtax->fk_bank); - if ($result > 0) $result=$accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing) + $result=$accountline->delete($user); } - if ($result >= 0) + if ($result > 0) { $db->commit(); header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php?localTaxType='.$localtax->ltt); @@ -155,26 +149,26 @@ if ($id) } -if ($action == 'create') +if ($_GET["action"] == 'create') { - print load_fiche_titre($langs->transcountry($lttype==2?"newLT2Payment":"newLT1Payment",$mysoc->country_code)); - - print ''."\n"; + print "\n"; print ''; print ''; print ''; - dol_fiche_head(); + print load_fiche_titre($langs->transcountry($lttype==2?"newLT2Payment":"newLT1Payment",$mysoc->country_code)); + + if ($mesg) print $mesg; print ''; print ""; print ''; print ''; // Label @@ -190,22 +184,13 @@ if ($action == 'create') print ''; print '\n"; print ""; - - // Number - print ''."\n"; - } - // Other attributes - $parameters=array('colspan' => ' colspan="1"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - + } print '
'.$langs->trans("DatePayment").''; - print Form::selectDate($datep,"datep",'','','','add',1,1); + print $form->select_date($datep,"datep",'','','','add'); print '
'.$langs->trans("DateValue").''; - print Form::selectDate($datev,"datev",'','','','add',1,1); + print $form->select_date($datev,"datev",'','','','add'); print '
'.$langs->trans("PaymentMode").''; - $form->select_types_paiements(GETPOST("paiementtype"), "paiementtype"); + $form->select_types_paiements($_POST["paiementtype"], "paiementtype"); print "
'.$langs->trans('Numero'); - print ' ('.$langs->trans("ChequeOrTransferNumber").')'; - print '
'; - dol_fiche_end(); + print "
"; print '
'; print ''; @@ -225,6 +210,8 @@ if ($action == 'create') if ($id) { + if ($mesg) print $mesg; + $h = 0; $head[$h][0] = DOL_URL_ROOT.'/compta/localtax/card.php?id='.$vatpayment->id; $head[$h][1] = $langs->trans('Card'); @@ -268,14 +255,9 @@ if ($id) } } - // Other attributes - $parameters=array('colspan' => ' colspan="3"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$vatpayment,$action); // Note that $action and $object may have been modified by hook - - print ''; + print ''; - dol_fiche_end(); - + print '
'; /* * Boutons d'actions diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 2e39dc6058e..ac30e529839 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -111,7 +111,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; @@ -129,7 +129,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$langs->trans("CalcModeLT2Debt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 887c3698af5..3bed627402e 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -27,15 +27,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $langs->load("other"); -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); - $localTaxType=GETPOST('localTaxType', 'int'); -$year=GETPOST("year","int"); -if ($year == 0) -{ +$year=$_GET["year"]; +if ($year == 0 ) { $year_current = strftime("%Y",time()); $year_start = $year_current; } else { @@ -127,24 +122,25 @@ if($localTaxType==1) { $textprevyear="".img_previous().""; $textnextyear=" ".img_next().""; -print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear", 'title_accountancy.png'); +print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); print $langs->trans("LTReportBuildWithOptionDefinedInModule").'
'; print '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')
'; print '
'; -print ''; -print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"t.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"t.label","",$param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateValue"),$_SERVER["PHP_SELF"],"dv","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"dm","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"type","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"t.amount","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); @@ -161,7 +160,6 @@ if ($result) print ''; print ''; print ''; - print ''; print ''; print ''; print "\n"; @@ -199,9 +197,8 @@ if ($result) $tva_static->ref=$obj->rowid; print "\n"; print "\n"; - print '\n"; - print '\n"; - // Type + print '\n"; + // Type print $type; // Amount $total = $total + $obj->amount; diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 0e392374053..3d6b792d99b 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -364,7 +364,7 @@ abstract class ActionsContactCardCommon if ($action == 'view' || $action == 'delete') { - $this->tpl['showrefnav'] = Form::showrefnav($this->object,'id'); + $this->tpl['showrefnav'] = $form->showrefnav($this->object,'id'); if ($this->object->socid > 0) { @@ -413,7 +413,7 @@ abstract class ActionsContactCardCommon array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password)); - $this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no'); + $this->tpl['action_create_user'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no'); } } diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 709c1b30300..30a52469da2 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -107,7 +107,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon // Confirm delete contact if ($action == 'delete' && $user->rights->societe->contact->supprimer) { - $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); + $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); } } diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index b1e48a42d50..fca007bfd1f 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -450,7 +450,7 @@ else { if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); } } @@ -633,7 +633,7 @@ else if (! empty($conf->mailing->enabled)) { print ''; - print ''; + print ''; } else { @@ -688,11 +688,11 @@ else $form=new Form($db); if ($object->birthday) { - print Form::selectDate($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1); + print $form->select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1); } else { - print Form::selectDate('','birthday',0,0,1,"perso", 1, 0, 1); + print $form->select_date('','birthday',0,0,1,"perso", 1, 0, 1); } print ''; @@ -873,7 +873,7 @@ else if (! empty($conf->mailing->enabled)) { print ''; - print ''; + print ''; } else { @@ -1044,7 +1044,7 @@ else if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser"); else $text.=$langs->trans("UserWillBeInternalUser"); } - print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); } diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index c9ca56cdbb1..8bebb6f0cfb 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -130,7 +130,7 @@ if ($action == 'edit') // Date To Birth print ''; print ''; print '"; // Project @@ -1243,7 +1243,7 @@ else */ if ($action == 'delete') { - print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); + print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); } @@ -1264,7 +1264,7 @@ else $text=$langs->trans('ConfirmValidateContract',$numref); - print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1); + print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1); } @@ -1273,7 +1273,7 @@ else */ if ($action == 'close') { - print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); + print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); } @@ -1294,31 +1294,31 @@ else // Ref du contrat if (!empty($modCodeContract->code_auto)) { print '"; } else { print ''; print ''; print ''; } print ''; print ''; print ''; print ''; print ''; print ''; @@ -1346,9 +1346,9 @@ else // Date print ''; print ''; print ''; /* print ''; @@ -1651,9 +1651,9 @@ else print ""; print ''; if (is_array($extralabelslines) && count($extralabelslines)>0) { @@ -1691,7 +1691,7 @@ else */ if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid')) { - print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); if ($ret == 'html') print '
'; -print load_fiche_titre($langs->transcountry($LTSummary,$mysoc->country_code), '', ''); -print ' '; -print load_fiche_titre($langs->transcountry($LTPaid,$mysoc->country_code), '', ''); +print ''; +print ''; -print ''; print ''; //Date print ''; print ''; //Reason diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 148052aa000..e7cef1a50ad 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -137,7 +137,7 @@ if ($result) print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index dd69ee71d6e..4286c6a8453 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -125,7 +125,7 @@ if ($modecompta=="CREANCES-DETTES") $name=$langs->trans("AnnualByCompaniesDueDebtMode"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=''.img_previous().''.img_next().''; $description=$langs->trans("RulesResultDue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -137,8 +137,8 @@ else { $name=$langs->trans("AnnualByCompaniesInputOutputMode"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - //$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',1,1,0,'',1,0,1); - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + //$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=''.img_previous().''.img_next().''; $description=$langs->trans("RulesResultInOut"); $builddate=time(); diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index eea7746dbeb..4a8dc21ca1b 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -239,13 +239,13 @@ if ($action == 'create') // Date payment print ''; // Date value for bank print ''; // Employee @@ -263,13 +263,13 @@ if ($action == 'create') // Date start period print ''; // Date end period print ''; // Amount @@ -340,7 +340,7 @@ if ($id) print ""; print ''; // Employee diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 7f89d9967c2..7e015a4ad2e 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -108,7 +108,7 @@ if ($object->id) // Ref print ''; // Societe diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 33218b00f02..b0584d62850 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -176,7 +176,7 @@ if ($result) print ''; print ''; print "\n"; diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index ba1e97f0db9..2a9894be87a 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -270,7 +270,7 @@ if ($action == 'create') print $langs->trans("PeriodEndDate"); print ''; print ''; print ''; // Amount @@ -286,7 +286,7 @@ if ($action == 'create') print $langs->trans("DateDue"); print ''; print ''; print "\n"; @@ -325,20 +325,20 @@ if ($id > 0) ); - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes'); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes'); } // Confirmation de la suppression de la charge if ($action == 'paid') { $text=$langs->trans('ConfirmPaySocialContribution'); - print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2); } if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteSocialContribution'); - print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2); } if ($action == 'edit') @@ -351,7 +351,7 @@ if ($id > 0) // Ref print '"; // Label @@ -443,7 +443,7 @@ if ($id > 0) print ""; } else { diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 81bc7e53382..f87791dfed9 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -107,7 +107,7 @@ if ($object->id) // Ref print '"; // Label @@ -130,7 +130,7 @@ if ($object->id) print ""; } else { diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index d33d3ea2414..3133022b9e6 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -205,7 +205,7 @@ if ($resql) print ''; print ''; print "\n"; diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 5ff08743dcf..e995b06aa6b 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") { $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -164,7 +164,7 @@ if ($modecompta=="CREANCES-DETTES") { $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 54a59926f5b..cb8151cf33c 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -139,7 +139,7 @@ if ($modecompta=="CREANCES-DETTES") { $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink="".img_previous()."".img_next().""; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") { $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink="".img_previous()."".img_next().""; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index d6b40e44389..dade07fd0e3 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -155,7 +155,7 @@ if ($modecompta=="CREANCES-DETTES") $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=''.img_previous().''.img_next().''; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -166,7 +166,7 @@ if ($modecompta=="CREANCES-DETTES") $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=''.img_previous().''.img_next().''; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 70133f6c82f..f7d8361b8ff 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -42,7 +42,7 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); -$object = new Tva($db); +$tva = new Tva($db); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('taxvatcard','globalcard')); @@ -52,22 +52,12 @@ $hookmanager->initHooks(array('taxvatcard','globalcard')); * Actions */ -if ($_POST["cancel"] == $langs->trans("Cancel") && ! $id) +if ($_POST["cancel"] == $langs->trans("Cancel")) { header("Location: reglement.php"); exit; } -if ($action == 'setdatev' && $user->rights->tax->charges->creer) -{ - $object->fetch($id); - $object->datev=dol_mktime(12,0,0,$_POST['datevmonth'],$_POST['datevday'],$_POST['datevyear']); - $result=$object->update($user); - if ($result < 0) dol_print_error($db,$object->error); - - $action=''; -} - if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) { $error=0; @@ -75,36 +65,36 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $datev=dol_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); $datep=dol_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]); - $object->accountid=GETPOST("accountid"); - $object->type_payment=GETPOST("type_payment"); - $object->num_payment=GETPOST("num_payment"); - $object->datev=$datev; - $object->datep=$datep; + $tva->accountid=GETPOST("accountid"); + $tva->type_payment=GETPOST("type_payment"); + $tva->num_payment=GETPOST("num_payment"); + $tva->datev=$datev; + $tva->datep=$datep; $amount = price2num(GETPOST("amount")); if ($refund == 1) { $amount= -$amount; } - $object->amount= $amount; - $object->label=GETPOST("label"); - $object->note=GETPOST("note"); + $tva->amount= $amount; + $tva->label=GETPOST("label"); + $tva->note=GETPOST("note"); - if (empty($object->datev)) + if (empty($tva->datev)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateValue")), null, 'errors'); $error++; } - if (empty($object->datep)) + if (empty($tva->datep)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePayment")), null, 'errors'); $error++; } - if (empty($object->type_payment) || $object->type_payment < 0) + if (empty($tva->type_payment) || $tva->type_payment < 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentMode")), null, 'errors'); $error++; } - if (empty($object->amount)) + if (empty($tva->amount)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); $error++; @@ -114,7 +104,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) { $db->begin(); - $ret=$object->addPayment($user); + $ret=$tva->addPayment($user); if ($ret > 0) { $db->commit(); @@ -124,7 +114,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) else { $db->rollback(); - setEventMessages($object->error, $object->errors, 'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); $action="create"; } } @@ -134,19 +124,19 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($action == 'delete') { - $result=$object->fetch($id); + $result=$tva->fetch($id); - if ($object->rappro == 0) + if ($tva->rappro == 0) { $db->begin(); - $ret=$object->delete($user); + $ret=$tva->delete($user); if ($ret > 0) { - if ($object->fk_bank) + if ($tva->fk_bank) { $accountline=new AccountLine($db); - $result=$accountline->fetch($object->fk_bank); + $result=$accountline->fetch($tva->fk_bank); if ($result > 0) $result=$accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing) } @@ -158,15 +148,15 @@ if ($action == 'delete') } else { - $object->error=$accountline->error; + $tva->error=$accountline->error; $db->rollback(); - setEventMessages($object->error, $object->errors, 'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); } } else { $db->rollback(); - setEventMessages($object->error, $object->errors, 'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); } } else @@ -186,7 +176,8 @@ $form = new Form($db); if ($id) { - $result = $object->fetch($id); + $vatpayment = new Tva($db); + $result = $vatpayment->fetch($id); if ($result <= 0) { dol_print_error($db); @@ -243,11 +234,11 @@ if ($action == 'create') print ""; print ''; print ''; // Label @@ -306,7 +297,7 @@ if ($action == 'create') if ($id) { $h = 0; - $head[$h][0] = DOL_URL_ROOT.'/compta/tva/card.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/tva/card.php?id='.$vatpayment->id; $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'card'; $h++; @@ -318,33 +309,29 @@ if ($id) print ""; print ''; // Label - print ''; + print ''; print ""; print ''; - - print ''; - print ''; + print ''; if (! empty($conf->banque->enabled)) { - if ($object->fk_account > 0) + if ($vatpayment->fk_account > 0) { $bankline=new AccountLine($db); - $bankline->fetch($object->fk_bank); + $bankline->fetch($vatpayment->fk_bank); print ''; print ''; @@ -357,22 +344,21 @@ if ($id) // Other attributes $parameters=array('colspan' => ' colspan="3"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$vatpayment,$action); // Note that $action and $object may have been modified by hook print '
'; +print load_fiche_titre($langs->transcountry($LTSummary,$mysoc->country_code)); + +print ' '; +print load_fiche_titre($langs->transcountry($LTPaid,$mysoc->country_code)); print '
'; +print '
'; -print ''; -print ''; -print '"; +print "
'.$langs->trans("Year")." ".$y."
"; +print ""; +print ""; if($CalcLT==0) { print ""; print ""; @@ -275,7 +271,7 @@ $sql.= " WHERE f.entity = ".$conf->entity; $sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'"; $sql.= " AND localtaxtype=".$localTaxType; -$sql.= " GROUP BY dm ASC ORDER BY dm ASC"; +$sql.= " GROUP BY dm ASC"; pt($db, $sql,$langs->trans("Year")." $y"); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 5fea79227f5..7c1e99b3537 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -131,7 +131,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice $nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode"); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } @@ -163,7 +163,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services $nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode"); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 5715d3c711b..72fd65d686b 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -462,7 +462,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''; print ''; @@ -773,7 +773,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $text.='
'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed"); print ''; } - print Form::formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); + print $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); } print "\n"; diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 42370682f4b..0f03eb8ae47 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -185,7 +185,7 @@ dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), 0, 'pa */ if ($action == 'delete') { - print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -195,7 +195,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -206,12 +206,12 @@ $linkback = '' . $langs- // Ref print ''; // Date payment -print ''; // Payment type (VIR, LIQ, ...) @@ -219,16 +219,16 @@ $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$obje print ''; // Payment numero -print ''; // Amount print ''; // Note -print ''; $disable_delete = 0; diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index a785094807f..fba7a9044fa 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -339,7 +339,7 @@ else */ if ($action == 'delete') { - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1); } @@ -348,7 +348,7 @@ else */ if ($action == 'valide') { - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1); } @@ -361,7 +361,7 @@ else array('type' => 'hidden','name' => 'bankid','value' => GETPOST('lineid')), array('type' => 'date','name' => 'rejectdate_','label' => $langs->trans("RejectCheckDate"),'value' => dol_now()) ); - print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1); } } @@ -387,7 +387,7 @@ if ($action == 'new') //print ''; // Filter print ''; print ''; @@ -601,7 +601,7 @@ else print '
'; print ''; print ''; - Form::selectDate($object->date_bordereau,'datecreate_','','','',"setdate"); + $form->select_date($object->date_bordereau,'datecreate_','','','',"setdate"); print ''; print ''; } diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index bad8b58cd5f..e70993bcaed 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -502,7 +502,7 @@ class RemiseCheque extends CommonObject dol_syslog("RemiseCheque::generatePdf model=".$model." id=".$this->id, LOG_DEBUG); - $dir=DOL_DOCUMENT_ROOT ."/core/modules/cheque/doc/"; + $dir=DOL_DOCUMENT_ROOT ."/core/modules/cheque/pdf/"; // Charge le modele $file = "pdf_".$model.".class.php"; diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index ff4beea6c0e..5b4929ae42b 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -162,7 +162,7 @@ if ($resql) print ''; print '
'; print ''; print "\n"; diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index f095e2ad577..bcca56ed645 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -265,7 +265,7 @@ if ($resql) print ''; print ''; print ''; if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 83c86cb528e..a68f3445305 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -209,7 +209,7 @@ if ($_GET["action"] == 'create') print '"; print ''; diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index a621a008f1b..ad59687b43c 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -144,7 +144,7 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0, */ if ($action == 'delete') { - print Form::formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print $form->formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -154,7 +154,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print Form::formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print $form->formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -164,7 +164,7 @@ print '
".$langs->trans("Year")." $y".$langs->transcountry($LTCustomer,$mysoc->country_code)."".$langs->transcountry($LTSupplier,$mysoc->country_code)."
'.$langs->trans('Date').''; $datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'') : $datepayment); - Form::selectDate($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date); + $form->select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date); print ''.$langs->trans('Comments').'
'.$langs->trans('Ref').''; -print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); +print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
'.Form::editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).''; -print Form::editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); +print '
'.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).''; +print $form->editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); print '
'.$langs->trans('PaymentMode').''.$labeltype.'
'.Form::editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; -print Form::editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); +print '
'.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; +print $form->editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); print '
'.$langs->trans('Amount').''.price($object->montant,'',$langs,0,0,-1,$conf->currency).'
'.Form::editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).''; -print Form::editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea'); +print '
'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).''; +print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea'); print '
'.$langs->trans('Date').''.dol_print_date($now,'day').'
'.$langs->trans("DateChequeReceived").''; - print Form::selectDate($filterdate,'fd',0,0,1,'',1,1,1); + print $form->select_date($filterdate,'fd',0,0,1,'',1,1,1); print '
'.$langs->trans("BankAccount").''; $form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1); @@ -582,7 +582,7 @@ else } else { - print Form::showrefnav($object,'ref',$linkback, 1, 'number'); + print $form->showrefnav($object,'ref',$linkback, 1, 'number'); } print ''; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'.$langs->trans("Date").''; $datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0; - Form::selectDate($datepayment,'','','','',"add_payment",1,1); + $form->select_date($datepayment,'','','','',"add_payment",1,1); print "
'; // Ref print ''; print ''; // Date diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index ea6c40ae159..9dd841e0add 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -156,7 +156,7 @@ if ($id > 0) /*if ($action == 'credite') { - print Form::formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); + print $form->formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); }*/ @@ -214,7 +214,7 @@ if ($id > 0) print ''; print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans('Ref').''; -print Form::showrefnav($paiement,'id','',1,'rowid','id'); +print $form->showrefnav($paiement,'id','',1,'rowid','id'); print '
'.$langs->trans("NotifyTransmision").'
'.$langs->trans("TransData").''; - print Form::selectDate('','','','','',"userfile",1,1); + print $form->select_date('','','','','',"userfile",1,1); print '
'.$langs->trans("TransMetod").''; print $form->selectarray("methode",$bon->methodes_trans); @@ -237,7 +237,7 @@ if ($id > 0) print '
'.$langs->trans("NotifyCredit").'
'.$langs->trans('CreditDate').''; - print Form::selectDate('','','','','',"infocredit",1,1); + print $form->select_date('','','','','',"infocredit",1,1); print '
'; print '
'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice"); diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index d21f7dc9ba7..d43ba27ef26 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -193,13 +193,13 @@ if ($id) //Select yes/no print '
'.$langs->trans("WithdrawalRefusedConfirm").' '.$soc->name.' ?'; - print Form::selectyesno("confirm",1,0); + print $form->selectyesno("confirm",1,0); print '
'.$langs->trans("RefusedData").''; - print Form::selectDate('','','','','',"confirm_rejet"); + print $form->select_date('','','','','',"confirm_rejet"); print '
  '; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'; print fieldLabel('DatePayment','datep',1).''; - print Form::selectDate((empty($datep)?-1:$datep),"datep",'','','','add',1,1); + print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1); print '
'; print fieldLabel('DateValue','datev',0).''; - print Form::selectDate((empty($datev)?-1:$datev),"datev",'','','','add',1,1); + print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1); print '
'; print fieldLabel('DateStartPeriod','datesp',1).''; - print Form::selectDate($datesp,"datesp",'','','','add'); + print $form->select_date($datesp,"datesp",'','','','add'); print '
'; print fieldLabel('DateEndPeriod','dateep',1).''; - print Form::selectDate($dateep,"dateep",'','','','add'); + print $form->select_date($dateep,"dateep",'','','','add'); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
'; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'; - print Form::selectDate(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); + print $form->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); print '
'; - print Form::selectDate(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); + print $form->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); print '
'.$langs->trans("Ref").''; - print Form::showrefnav($object,'id'); + print $form->showrefnav($object,'id'); print "
"; if ($action == 'edit') { - print Form::selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1); + print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); } else { @@ -455,7 +455,7 @@ if ($id > 0) if ($action == 'edit') { print '
'.$langs->trans("DateDue").""; - print Form::selectDate($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); + print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print "
'.$langs->trans("Ref").''; - print Form::showrefnav($object,'id'); + print $form->showrefnav($object,'id'); print "
"; if ($action == 'edit') { - print Form::selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1); + print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); } else { @@ -143,7 +143,7 @@ if ($object->id) if ($action == 'edit') { print '
'.$langs->trans("DateDue").""; - print Form::selectDate($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); + print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print "
 '; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
'.$langs->trans("DatePayment").''; - print Form::selectDate($datep,"datep",'','','','add',1,1); + print $form->select_date($datep,"datep",'','','','add',1,1); print '
'.$langs->trans("DateValue").''; - print Form::selectDate($datev,"datev",'','','','add',1,1); + print $form->select_date($datev,"datev",'','','','add',1,1); print '
'.$langs->trans("Ref").''; - print $object->ref; + print $vatpayment->ref; print '
'.$langs->trans("Label").''.$object->label.'
'.$langs->trans("Label").''.$vatpayment->label.'
'.$langs->trans("DatePayment").''; - print dol_print_date($object->datep,'day'); + print dol_print_date($vatpayment->datep,'day'); print '
'; - print $form->editfieldkey("DateValue", 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); - print ''; - print $form->editfieldval("DateValue", 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); - //print dol_print_date($object->datev,'day'); + print '
'.$langs->trans("DateValue").''; + print dol_print_date($vatpayment->datev,'day'); print '
'.$langs->trans("Amount").''.price($object->amount).'
'.$langs->trans("Amount").''.price($vatpayment->amount).'
'.$langs->trans('BankTransactionLine').'
'; - dol_fiche_end(); + print ''; - /* * Boutons d'actions */ print "
\n"; - if ($object->rappro == 0) + if ($vatpayment->rappro == 0) { if (! empty($user->rights->tax->charges->supprimer)) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } else { diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 6e59b44514a..b0d7a9bce30 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -140,7 +140,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; //$name.='
('.$langs->trans("SeeVATReportInInputOutputMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesVATDueServices"); $description.='
'; @@ -183,7 +183,7 @@ if ($modetax==0) { // Invoice for goods, payment for services $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; //$name.='
('.$langs->trans("SeeVATReportInDueDebtMode",'','').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesVATInServices"); $description.=' '.$langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index c49b24102cb..dc2be67e44f 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -56,7 +56,7 @@ if (isset($_GET["modetax"])) $modetax=$_GET["modetax"]; /** - * print function + * pt * * @param DoliDB $db Database handler * @param string $sql SQL Request diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index 8fbf0d89093..e04530a9dc7 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -130,7 +130,7 @@ if ($modetax==1) // Calculate on invoice for goods and services $nom=$langs->trans("VATReportByQuartersInDueDebtMode"); $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } @@ -165,7 +165,7 @@ if ($modetax==0) // Invoice for goods, payment for services $nom=$langs->trans("VATReportByQuartersInInputOutputMode"); $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php index 7f4157fceea..61d019894e8 100644 --- a/htdocs/compta/tva/quarter_report.php +++ b/htdocs/compta/tva/quarter_report.php @@ -149,7 +149,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services $nom=$langs->trans("VATReportByQuartersInDueDebtMode"); $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) { $prevquarter--; @@ -198,7 +198,7 @@ if ($modetax==0) { // Invoice for goods, payment for services $nom=$langs->trans("VATReportByQuartersInInputOutputMode"); $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) { $prevquarter--; diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index 1c17e68362a..9615bec99f1 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2014 Alexandre Spangaro * @@ -91,7 +91,7 @@ $form = new Form($db); $formother=new FormOther($db); $tva_static = new Tva($db); -$sql = "SELECT t.rowid, t.amount, t.label, t.datev as dv, t.datep as dp, t.fk_typepayment as type, t.num_payment, pst.code as payment_code"; +$sql = "SELECT t.rowid, t.amount, t.label, t.datev as dm, t.fk_typepayment as type, t.num_payment, pst.code as payment_code"; $sql.= " FROM ".MAIN_DB_PREFIX."tva as t"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON t.fk_typepayment = pst.id"; $sql.= " WHERE t.entity = ".$conf->entity; @@ -151,8 +151,7 @@ if ($result) print '
'; print ''; $syear = $year; @@ -174,7 +172,7 @@ if ($result) print ''; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print '
".$tva_static->getNomUrl(1)."".dol_trunc($obj->label,40)."'.dol_print_date($db->jdate($obj->dv),'day')."'.dol_print_date($db->jdate($obj->dp),'day')."'.dol_print_date($db->jdate($obj->dm),'day')."'.Form::selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).''.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).''.Form::selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'
'.$langs->trans("DateToBirth").''; $form=new Form($db); - print Form::selectDate($object->birthday,'birthday',0,0,1,"perso", 1,0,1); + print $form->select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1); print ''.$langs->trans("Alert").': '; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 20171da0cd9..c8903d8d363 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1148,7 +1148,7 @@ if ($action == 'create') print '
'.$langs->trans("Date").''; - Form::selectDate($datecontrat,'',0,0,'',"contrat"); + $form->select_date($datecontrat,'',0,0,'',"contrat"); print "
'.$langs->trans("Ref").''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print "
'; - print Form::editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); + print $form->editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); print ''; - print Form::editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); + print $form->editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); print '
'; - print Form::editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); + print $form->editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); print ''; - print Form::editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); + print $form->editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); print '
'; - print Form::editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); + print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print ''; - print Form::editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); + print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print '
'; - print Form::editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer); + print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer); print ''; - print Form::editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker'); + print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker'); print '
'.$langs->trans("Date").'
'; print $langs->trans("DateStartPlanned").' '; - Form::selectDate($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); + $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); print '   '.$langs->trans("DateEndPlanned").' '; - Form::selectDate($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); + $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); print '
'; } @@ -1711,7 +1711,7 @@ else 'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"), array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); - $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); + $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); print '
'; } @@ -1723,7 +1723,7 @@ else $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $comment = GETPOST('comment'); - $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); + $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); print '
'; } @@ -1735,7 +1735,7 @@ else $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $comment = GETPOST('comment'); - $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); + $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); print '
'; } @@ -1824,11 +1824,11 @@ else print ''; print ''.$langs->trans("DateServiceActivate").''; - print Form::selectDate($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); + print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); print ''; print ''.$langs->trans("DateEndPlanned").''; - print Form::selectDate($dateactend,"end",$usehm,$usehm,'',"active",1,0,1); + print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1); print ''; print ''; @@ -1881,7 +1881,7 @@ else if ($objp->statut == 4) { print $langs->trans("DateEndReal").' '; - print Form::selectDate($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1); + print $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1); } } print ''; diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index e526b840af8..cd070f6078d 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -143,7 +143,7 @@ if ($id > 0 || ! empty($ref)) // Reference du contrat print ''.$langs->trans("Ref").''; - print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ""; // Customer diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 148abdb0ed1..49466c7fcb0 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -110,7 +110,7 @@ if ($object->id) $linkback = ''.$langs->trans("BackToList").''; // Reference - print ''.$langs->trans('Ref').''.Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; + print ''.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; // Societe print ''.$langs->trans("Customer").''; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 93fe5547fec..df6e0007023 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -267,7 +267,7 @@ if ($resql) print ' '; print ''; print ''; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index be39c90de57..502b354ee69 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -78,7 +78,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Reference - print ''.$langs->trans('Ref').''.Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; + print ''.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; // Societe print ''.$langs->trans("Customer").''; diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index dff703c042a..2f1c3697058 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -219,14 +219,14 @@ if ($resql) print $form->selectarray('filter_op1',$arrayofoperators,$filter_op1,1); print ' '; $filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year); - print Form::selectDate($filter_date1,'op1',0,0,1,'',1,0,1); + print $form->select_date($filter_date1,'op1',0,0,1,'',1,0,1); print ''; print ''; $arrayofoperators=array('<'=>'<','>'=>'>'); print $form->selectarray('filter_op2',$arrayofoperators,$filter_op2,1); print ' '; $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); - print Form::selectDate($filter_date2,'op2',0,0,1,'',1,0,1); + print $form->select_date($filter_date2,'op2',0,0,1,'',1,0,1); print ''; print ''; $arrayofstatus=array( @@ -239,7 +239,7 @@ if ($resql) print $form->selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1); print ''; print ''; - $searchpitco=Form::showFilterAndCheckAddButtons(); + $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 3a0c6d05ff4..997e27adb20 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -241,7 +241,7 @@ if ($section) $useglobalvars=1; $form = new Form($db); $formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile')); - print Form::formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); + print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); } if ($useajax) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 2de07969918..97645487d45 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -694,7 +694,7 @@ class ExtraFields $showtime = in_array($type,array('datetime')) ? 1 : 0; - // Do not show current date when field not required (see selectDate() method) + // Do not show current date when field not required (see select_date() method) if (!$required && $value == '') $value = '-1'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; @@ -702,7 +702,7 @@ class ExtraFields if (! is_object($form)) $form=new Form($this->db); // TODO Must also support $moreparam - $out = Form::selectDate($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); + $out = $form->select_date($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); } elseif (in_array($type,array('int'))) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a6161ba4fed..d06677d97af 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -74,15 +74,14 @@ class Form * * @param string $text Text of label or key to translate * @param string $htmlname Name of select field ('edit' prefix will be added) - * @param string $value Value to show/edit (not used in this function) + * @param string $preselected Name of Value to show/edit (not used in this function) * @param object $object Object * @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field. * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) - * @param string $moreparam More param to add on a href URL* - * @param int $fieldrequired 1 if we want to show field as mandatory using the fieldrequired CSS. + * @param string $moreparam More param to add on a href URL * @return string HTML edit field */ - function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0) + function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='') { global $conf,$langs; @@ -95,24 +94,18 @@ class Form { $tmp=explode(':',$typeofdata); $ret.= '
'; - if ($fieldrequired) $ret.=''; $ret.= $langs->trans($text); - if ($fieldrequired) $ret.=''; $ret.= '
'."\n"; } else { - if ($fieldrequired) $ret.=''; $ret.= $langs->trans($text); - if ($fieldrequired) $ret.=''; } } else { if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.=''; if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.=''; if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='
'; - if ($fieldrequired) $ret.=''; $ret.=$langs->trans($text); - if ($fieldrequired) $ret.=''; if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='id.$moreparam.'">'.img_edit($langs->trans('Edit'),1).'
'; @@ -202,14 +195,15 @@ class Form $ret.=$doleditor->Create(1); } $ret.=''; - - $ret.=''; - $ret.=''; - if (preg_match('/ckeditor|textarea/',$typeofdata)) $ret.='
'."\n"; - $ret.=''; - $ret.=''; - - $ret.=''."\n"; + //if ($typeofdata != 'day' && $typeofdata != 'dayhour' && $typeofdata != 'datepicker' && $typeofdata != 'datehourpicker') + //{ + $ret.=''; + $ret.=''; + if (preg_match('/ckeditor|textarea/',$typeofdata)) $ret.='
'."\n"; + $ret.=''; + $ret.=''; + //} + $ret.=''."\n"; $ret.=''."\n"; } else @@ -3641,7 +3635,7 @@ class Form * @param int $displaymin Display minutes selector * @param int $nooutput 1=No print output, return string * @return void - * @see selectDate + * @see select_date */ function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) { @@ -3968,7 +3962,6 @@ class Form * @param string $selected preselected currency code * @param string $htmlname name of HTML select list * @return void - * @deprecated use Form::selectCurrency */ function select_currency($selected='',$htmlname='currency_id') { @@ -4279,10 +4272,10 @@ class Form * @param int $nooutput Do not output html string but return it * @param int $disabled Disable input fields * @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 - * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field. + * @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field. * @param datetime $adddateof Add a link "Date of invoice" using the following date. * @return mixed Nothing or string if nooutput is 1 - * @see formDate + * @see form_date */ function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 239369b2a1c..339ba9c6b5e 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2010-2014 Regis Houssin - * Copyright (C) 2010-2016 Juanjo Menent + * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Marcos García @@ -445,7 +445,7 @@ class FormFile if (is_array($genallowed)) $modellist=$genallowed; else { - include_once DOL_DOCUMENT_ROOT.'/core/modules/cheque/modules_chequereceipts.php'; + include_once DOL_DOCUMENT_ROOT.'/core/modules/cheque/pdf/modules_chequereceipts.php'; $modellist=ModeleChequeReceipts::liste_modeles($this->db); } } diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 7fc7297469d..9d540a37bb6 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -562,7 +562,7 @@ class FormMail extends Form if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_SUPPLIER_PROPOSAL) && ! empty($this->param['models']) && $this->param['models'] == 'supplier_proposal_send') $defaultvaluefordeliveryreceipt=1; if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_ORDER) && ! empty($this->param['models']) && $this->param['models'] == 'order_send') $defaultvaluefordeliveryreceipt=1; if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_INVOICE) && ! empty($this->param['models']) && $this->param['models'] == 'facture_send') $defaultvaluefordeliveryreceipt=1; - $out.= Form::selectyesno('deliveryreceipt', (isset($_POST["deliveryreceipt"])?$_POST["deliveryreceipt"]:$defaultvaluefordeliveryreceipt), 1); + $out.= $form->selectyesno('deliveryreceipt', (isset($_POST["deliveryreceipt"])?$_POST["deliveryreceipt"]:$defaultvaluefordeliveryreceipt), 1); } $out.= "\n"; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 2b36f3f9a31..5c6b9613c17 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1179,7 +1179,7 @@ function form_constantes($tableau,$strictw3c=0) } else if ($obj->type == 'yesno') { - print Form::selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1); + print $form->selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1); print ''; } else diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ce75a6ccc05..12c759a67d6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -910,7 +910,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r { if ($showimage) $morehtmlleft.='
'.$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'
'; } - if ($showbarcode) $morehtmlleft.='
'.Form::showbarcode($object).'
'; + if ($showbarcode) $morehtmlleft.='
'.$form->showbarcode($object).'
'; if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); } @@ -947,7 +947,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $morehtmlref.=$langs->trans("TechnicalID").': '.$object->id; $morehtmlref.=''; } - print Form::showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); + print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); print ''; print '
'; } @@ -958,7 +958,6 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r * @param string $langkey Translation key * @param string $fieldkey Key of the html select field the text refers to * @param int $fieldrequired 1=Field is mandatory - * @deprecated Form::editfieldkey */ function fieldLabel($langkey, $fieldkey, $fieldrequired=0) { diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 4587d58c760..a952159b874 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -9,7 +9,7 @@ * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> - * Copyright (C) 2015-2016 Marcos García + * Copyright (C) 2015 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ * @param Translate $outputlangs Output lang to use to autodetect output format if setup not done * @return array Array('width'=>w,'height'=>h,'unit'=>u); */ -function pdf_getFormat(Translate $outputlangs = null) +function pdf_getFormat($outputlangs='') { global $conf,$db; @@ -77,7 +77,7 @@ function pdf_getFormat(Translate $outputlangs = null) * @param string $format Array(width,height). Keep empty to use default setup. * @param string $metric Unit of format ('mm') * @param string $pagetype 'P' or 'l' - * @return TCPDF PDF object + * @return TPDF PDF object */ function pdf_getInstance($format='',$metric='mm',$pagetype='P') { @@ -230,7 +230,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P') * @param Translate $outputlangs Output langs object * @return string Name of font to use */ -function pdf_getPDFFont(Translate $outputlangs) +function pdf_getPDFFont($outputlangs) { global $conf; @@ -253,7 +253,7 @@ function pdf_getPDFFont(Translate $outputlangs) * @param Translate $outputlangs Output langs object * @return int Size of font to use */ -function pdf_getPDFFontSize(Translate $outputlangs) +function pdf_getPDFFontSize($outputlangs) { $size=10; // By default, for FPDI or ISO language on TCPDF if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 one like DejaVuSans if required (slower) @@ -295,10 +295,9 @@ function pdf_getHeightForLogo($logo, $url = false) * * @param TCPDF $pdf PDF initialized object * @param string $htmlcontent HTML Contect - * @return int * @see getStringHeight */ -function pdfGetHeightForHtmlContent(TCPDF $pdf, $htmlcontent) +function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent) { // store current object $pdf->startTransaction(); @@ -378,7 +377,7 @@ function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includeali * @param Object $object Object we want to build document for * @return string String with full address */ -function pdf_build_address(Translate $outputlangs, Societe $sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$object=null) +function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$object=null) { global $conf, $hookmanager; @@ -531,12 +530,12 @@ function pdf_build_address(Translate $outputlangs, Societe $sourcecompany,$targe /** * Show header of page for PDF generation * - * @param TCPDF $pdf Object PDF + * @param PDF $pdf Object PDF * @param Translate $outputlangs Object lang for output * @param int $page_height Height of page * @return void */ -function pdf_pagehead(TCPDF $pdf, Translate $outputlangs,$page_height) +function pdf_pagehead(&$pdf,$outputlangs,$page_height) { global $conf; @@ -552,7 +551,7 @@ function pdf_pagehead(TCPDF $pdf, Translate $outputlangs,$page_height) /** * Add a draft watermark on PDF files * - * @param TCPDF $pdf Object PDF + * @param PDF $pdf Object PDF * @param Translate $outputlangs Object lang * @param int $h Height of PDF * @param int $w Width of PDF @@ -560,7 +559,7 @@ function pdf_pagehead(TCPDF $pdf, Translate $outputlangs,$page_height) * @param string $text Text to show * @return void */ -function pdf_watermark(TCPDF $pdf, Translate $outputlangs, $h, $w, $unit, $text) +function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) { // Print Draft Watermark if ($unit=='pt') $k=1; @@ -592,7 +591,7 @@ function pdf_watermark(TCPDF $pdf, Translate $outputlangs, $h, $w, $unit, $text) /** * Show bank informations for PDF generation * - * @param TCPDF $pdf Object PDF + * @param PDF $pdf Object PDF * @param Translate $outputlangs Object lang * @param int $curx X * @param int $cury Y @@ -601,7 +600,7 @@ function pdf_watermark(TCPDF $pdf, Translate $outputlangs, $h, $w, $unit, $text) * @param int $default_font_size Default font size * @return float The Y PDF position */ -function pdf_bank(TCPDF $pdf, Translate $outputlangs,$curx,$cury, Account $account,$onlynumber=0,$default_font_size=10) +function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default_font_size=10) { global $mysoc, $conf; @@ -784,19 +783,19 @@ function pdf_bank(TCPDF $pdf, Translate $outputlangs,$curx,$cury, Account $accou /** * Show footer of page for PDF generation * - * @param TCPDF $pdf The PDF factory + * @param PDF $pdf The PDF factory * @param Translate $outputlangs Object lang for output * @param string $paramfreetext Constant name of free text * @param Societe $fromcompany Object company * @param int $marge_basse Margin bottom we use for the autobreak * @param int $marge_gauche Margin left (no more used) * @param int $page_hauteur Page height (no more used) - * @param object $object Object shown in PDF + * @param Object $object Object shown in PDF * @param int $showdetails Show company details into footer. This param seems to not be used by standard version. (1=Show address, 2=Show managers, 3=Both) * @param int $hidefreetext 1=Hide free text, 0=Show free text * @return int Return height of bottom margin including footer text */ -function pdf_pagefoot(TCPDF $pdf, Translate $outputlangs,$paramfreetext, Societe $fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0) +function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0) { global $conf,$user; @@ -1016,7 +1015,7 @@ function pdf_pagefoot(TCPDF $pdf, Translate $outputlangs,$paramfreetext, Societe /** * Show linked objects for PDF generation * - * @param TCPDF $pdf Object PDF + * @param PDF $pdf Object PDF * @param object $object Object * @param Translate $outputlangs Object lang * @param int $posx X @@ -1027,7 +1026,7 @@ function pdf_pagefoot(TCPDF $pdf, Translate $outputlangs,$paramfreetext, Societe * @param string $default_font_size Font size * @return float The Y PDF position */ -function pdf_writeLinkedObjects(TCPDF $pdf,$object, Translate $outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) +function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) { $linkedobjects = pdf_getLinkedObjects($object,$outputlangs); if (! empty($linkedobjects)) @@ -1053,8 +1052,8 @@ function pdf_writeLinkedObjects(TCPDF $pdf,$object, Translate $outputlangs,$posx /** * Output line description into PDF * - * @param TCPDF $pdf PDF object - * @param object $object Object + * @param PDF $pdf PDF object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object lang for output * @param int $w Width @@ -1066,7 +1065,7 @@ function pdf_writeLinkedObjects(TCPDF $pdf,$object, Translate $outputlangs,$posx * @param int $issupplierline Is it a line for a supplier object ? * @return string */ -function pdf_writelinedesc(TCPDF $pdf,$object,$i, Translate $outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0) { global $db, $conf, $langs, $hookmanager; @@ -1096,7 +1095,7 @@ function pdf_writelinedesc(TCPDF $pdf,$object,$i, Translate $outputlangs,$w,$h,$ /** * Return line description translated in outputlangs and encoded into htmlentities and with
* - * @param object $object Object + * @param Object $object Object * @param int $i Current line number (0 = first line, 1 = second line, ...) * @param Translate $outputlangs Object langs for output * @param int $hideref Hide reference @@ -1104,7 +1103,7 @@ function pdf_writelinedesc(TCPDF $pdf,$object,$i, Translate $outputlangs,$w,$h,$ * @param int $issupplierline Is it a line for a supplier object ? * @return string String with line */ -function pdf_getlinedesc($object,$i, Translate $outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) { global $db, $conf, $langs; @@ -1283,13 +1282,13 @@ function pdf_getlinedesc($object,$i, Translate $outputlangs,$hideref=0,$hidedesc /** * Return line num * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinenum($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1316,13 +1315,13 @@ function pdf_getlinenum($object,$i, Translate $outputlangs,$hidedetails=0) /** * Return line product ref * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1348,13 +1347,13 @@ function pdf_getlineref($object,$i, Translate $outputlangs,$hidedetails=0) /** * Return line ref_supplier * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref_supplier($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1380,13 +1379,13 @@ function pdf_getlineref_supplier($object,$i, Translate $outputlangs,$hidedetails /** * Return line vat rate * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinevatrate($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1413,13 +1412,13 @@ function pdf_getlinevatrate($object,$i, Translate $outputlangs,$hidedetails=0) /** * Return line unit price excluding tax * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineupexcltax($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) { global $conf, $hookmanager; @@ -1453,13 +1452,13 @@ function pdf_getlineupexcltax($object,$i, Translate $outputlangs,$hidedetails=0) /** * Return line unit price including tax * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string */ -function pdf_getlineupwithtax($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1486,13 +1485,13 @@ function pdf_getlineupwithtax($object,$i, Translate $outputlangs,$hidedetails=0) /** * Return line quantity * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1520,13 +1519,13 @@ function pdf_getlineqty($object,$i, Translate $outputlangs,$hidedetails=0) /** * Return line quantity asked * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_asked($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1554,13 +1553,13 @@ function pdf_getlineqty_asked($object,$i, Translate $outputlangs,$hidedetails=0) /** * Return line quantity shipped * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_shipped($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1588,13 +1587,13 @@ function pdf_getlineqty_shipped($object,$i, Translate $outputlangs,$hidedetails= /** * Return line keep to ship quantity * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_keeptoship($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1622,14 +1621,14 @@ function pdf_getlineqty_keeptoship($object,$i, Translate $outputlangs,$hidedetai /** * Return line unit * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @param HookManager $hookmanager Hook manager instance * @return void */ -function pdf_getlineunit($object, $i, Translate $outputlangs, $hidedetails = 0, $hookmanager = false) +function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = false) { global $langs; @@ -1665,13 +1664,13 @@ function pdf_getlineunit($object, $i, Translate $outputlangs, $hidedetails = 0, /** * Return line remise percent * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineremisepercent($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1701,14 +1700,14 @@ function pdf_getlineremisepercent($object,$i, Translate $outputlangs,$hidedetail /** * Return line percent * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @param HookManager $hookmanager Hook manager instance * @return string */ -function pdf_getlineprogress($object, $i, Translate $outputlangs, $hidedetails = 0, HookManager $hookmanager = null) +function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null) { $reshook=0; $result=''; @@ -1734,13 +1733,13 @@ function pdf_getlineprogress($object, $i, Translate $outputlangs, $hidedetails = /** * Return line total excluding tax * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string Return total of line excl tax */ -function pdf_getlinetotalexcltax($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) { global $conf, $hookmanager; @@ -1778,13 +1777,13 @@ function pdf_getlinetotalexcltax($object,$i, Translate $outputlangs,$hidedetails /** * Return line total including tax * - * @param object $object Object + * @param Object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string Return total of line incl tax */ -function pdf_getlinetotalwithtax($object,$i, Translate $outputlangs,$hidedetails=0) +function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) { global $hookmanager; @@ -1815,12 +1814,12 @@ function pdf_getlinetotalwithtax($object,$i, Translate $outputlangs,$hidedetails /** * Return total quantity of products and/or services * - * @param object $object Object + * @param Object $object Object * @param string $type Type * @param Translate $outputlangs Object langs for output * @return integer */ -function pdf_getTotalQty($object,$type, Translate $outputlangs) +function pdf_getTotalQty($object,$type,$outputlangs) { global $hookmanager; @@ -1867,7 +1866,7 @@ function pdf_getTotalQty($object,$type, Translate $outputlangs) * @param Translate $outputlangs Object lang for output * @return array Linked objects */ -function pdf_getLinkedObjects($object, Translate $outputlangs) +function pdf_getLinkedObjects($object,$outputlangs) { global $hookmanager; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index dd3df558c01..92229a72d23 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -636,7 +636,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t // Form to add new time print ''; - $tableCell=Form::selectDate($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask); + $tableCell=$form->select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask); print $tableCell; print ''; diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index fdbce72eec8..0c154e031d8 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -26,7 +26,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 100__+MAX_llx_menu__, 'home', 'setup', 1__+MAX_llx_menu__, '/admin/index.php?leftmenu=setup', 'Setup', 0, 'admin', '', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 101__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/company.php?leftmenu=setup', 'MenuCompanySetup', 1, 'admin', '', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 102__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/ihm.php?leftmenu=setup', 'GUISetup', 1, 'admin', '', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup" && $conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 114__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/translation.php?leftmenu=setup', 'Translation', 1, 'admin', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 103__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/modules.php?leftmenu=setup', 'Modules', 1, 'admin', '', '', 2, 2, __ENTITY__); @@ -322,24 +322,19 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5200__+MAX_llx_menu__, 'members', 'cat', 13__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=3', 'MembersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5201__+MAX_llx_menu__, 'members', '', 5200__+MAX_llx_menu__, '/categories/card.php?action=create&type=3', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- HRM - Employee -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/index.php?leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->hrm->employee->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?action=create&leftmenu=hrm', 'NewEmployee', 1, 'hrm', '$user->rights->hrm->employee->write', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/index.php?leftmenu=hrm&mode=employee', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/index.php?&leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->hrm->employee->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?&action=create', 'NewEmployee', 1, 'hrm', '$user->rights->hrm->employee->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/index.php?$leftmenu=hrm&mode=employee', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__); -- HRM - Holiday -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'holiday', 15__+MAX_llx_menu__, '/holiday/list.php?leftmenu=holiday', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?action=request&leftmenu=holiday', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?leftmenu=holiday', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=holiday', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?action=request&leftmenu=holiday', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?action=request&leftmenu=holiday', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__); --- HRM - Trips and expenses (old module) +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?&action=request', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__); +-- HRM - Expense reports insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2102__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/list.php?leftmenu=tripsandexpenses', 'List', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2103__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses', 'Statistics', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__); --- HRM - Expense reports -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5300__+MAX_llx_menu__, 'hrm', 'expensereport', 15__+MAX_llx_menu__, '/expensereport/index.php?leftmenu=expensereport', 'TripsAndExpenses', 0, 'trips', '$user->rights->expensereport->lire', '', 0, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5301__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/card.php?action=create&leftmenu=expensereport', 'New', 1, 'trips', '$user->rights->expensereport->creer', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5302__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/list.php?leftmenu=expensereport', 'List', 1, 'trips', '$user->rights->expensereport->lire', '', 0, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5303__+MAX_llx_menu__, 'hrm', '', 5302__+MAX_llx_menu__, '/expensereport/list.php?search_status=2&leftmenu=expensereport', 'ListToApprove', 2, 'trips', '$user->rights->expensereport->approve', '', 0, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5304__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/stats/index.php?leftmenu=expensereport', 'Statistics', 1, 'trips', '$user->rights->expensereport->lire', '', 0, 2, __ENTITY__); + diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 018b0b4346b..bcbcf3b154e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1233,17 +1233,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->deplacement->lire); $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->deplacement->lire); } - - // Expense report - if (! empty($conf->expensereport->enabled)) - { - $langs->load("trips"); - $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->expensereport->lire, '', $mainmenu, 'expensereport'); - $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->expensereport->creer); - $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->expensereport->lire); - $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->expensereport->approve); - $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire); - } } diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 10115d34289..b6d4df5657f 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -101,6 +101,8 @@ class doc_generic_order_odt extends ModelePDFCommandes $langs->load("companies"); $langs->load("errors"); + $form = new Form($this->db); + $texte = $this->description.".
\n"; $texte.= '
'; $texte.= ''; @@ -142,26 +144,8 @@ class doc_generic_order_odt extends ModelePDFCommandes $texte.= '
'; // Scan directories - $nbofiles=count($listoffiles); - if (! empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH)) - { - $texte.=$langs->trans("NumberOfModelFilesFound").': '; - //$texte.=$nbofiles?'':''; - $texte.=count($listoffiles); - //$texte.=$nbofiles?'':''; - $texte.=''; - } + if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; - if ($nbofiles) - { - $texte.=''; // Scan directories - $nbofiles=count($listoffiles); - if (! empty($conf->global->EXPEDITION_ADDON_PDF_ODT_PATH)) - { - $texte.=$langs->trans("NumberOfModelFilesFound").': '; - //$texte.=$nbofiles?'':''; - $texte.=count($listoffiles); - //$texte.=$nbofiles?'':''; - $texte.=''; - } - if ($nbofiles) - { - $texte.=''; // Scan directories - $nbofiles=count($listoffiles); - if (! empty($conf->global->FACTURE_ADDON_PDF_ODT_PATH)) - { - $texte.=$langs->trans("NumberOfModelFilesFound").': '; - //$texte.=$nbofiles?'':''; - $texte.=count($listoffiles); - //$texte.=$nbofiles?'':''; - $texte.=''; - } - if ($nbofiles) - { - $texte.=''; // Scan directories - $nbofiles=count($listoffiles); - if (! empty($conf->global->PROJECT_ADDON_PDF_ODT_PATH)) - { - $texte.=$langs->trans("NumberOfModelFilesFound").': '; - //$texte.=$nbofiles?'':''; - $texte.=$nbofiles; - //$texte.=$nbofiles?'':''; - $texte.=''; - } - - if ($nbofiles) - { - $texte.=''; // Scan directories - $nbofiles=count($listoffiles); - if (! empty($conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH)) - { - $texte.=$langs->trans("NumberOfModelFilesFound").': '; - //$texte.=$nbofiles?'':''; - $texte.=$nbofiles; - //$texte.=$nbofiles?'':''; - $texte.=''; - } - - if ($nbofiles) - { - $texte.=''; // Scan directories - $nbofiles=count($listoffiles); - if (! empty($conf->global->PROPALE_ADDON_PDF_ODT_PATH)) + if (count($listofdir)) { - $texte.=$langs->trans("NumberOfModelFilesFound").': '; - //$texte.=$nbofiles?'':''; - $texte.=count($listoffiles); - //$texte.=$nbofiles?'':''; - $texte.=''; - } + $texte.=$langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; - if ($nbofiles) - { - $texte.='