Merge branch 'develop' of github.com:Dolibarr/dolibarr into New_look_and_feel_appli
This commit is contained in:
commit
584100807a
@ -1,7 +1,8 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
# EditorConfig is awesome: https://editorconfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
@ -11,9 +12,10 @@ insert_final_newline = true
|
||||
# PHP PSR-2 Coding Standards
|
||||
# http://www.php-fig.org/psr/psr-2/
|
||||
[*.php]
|
||||
indent_style = space
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
[*.js]
|
||||
indent_style = tab
|
||||
[*.css]
|
||||
|
||||
@ -19,7 +19,7 @@ PHPDebugBar 1.15.0 MIT License Yes Used only by
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
Mobiledetect 2.8.17 MIT License Yes Detect mobile devices browsers
|
||||
Mobiledetect 2.8.83 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
|
||||
@ -35,7 +35,7 @@ Restler 3.0.0RC6 LGPL-3+ Yes
|
||||
TCPDF 6.2.25 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 4.7.0 MIT licence Yes Library for Stripe module
|
||||
Stripe 6.34.5 MIT licence Yes Library for Stripe module
|
||||
|
||||
JS libraries:
|
||||
jQuery 3.3.1 MIT License Yes JS library
|
||||
|
||||
233
ChangeLog
233
ChangeLog
@ -6,21 +6,160 @@ English Dolibarr ChangeLog
|
||||
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
|
||||
For Users:
|
||||
NEW: Module "Ticket" is available as a stable module.
|
||||
NEW: module "Email Collector" is available as a stable module.
|
||||
NEW: module "TakePOS" is available as a stable module.
|
||||
NEW: Module "Email Collector" is available as a stable module.
|
||||
NEW: Module "TakePOS" is available as a stable module.
|
||||
NEW: Experimental module "Vendor receptions".
|
||||
NEW: Experimental module "BOM".
|
||||
FIX: Disallow line start date if after end date.
|
||||
NEW: Accounting - Add default accounting account for member subcriptions.
|
||||
NEW: Accounting - More comprehensive menu.
|
||||
NEW: Agenda/event - add description column available in list (hidden by default).
|
||||
NEW: Add accounting account for result.
|
||||
NEW: Add accounting code for EEC sales and export sales on products.
|
||||
NEW: Add a security permission to edit php dynamic content on the WebSite module.
|
||||
NEW: Attached document on bank account are now visible in automatic ECM.
|
||||
NEW: Add Autofill Remainder Amount picto on the Expense Report Payment Page.
|
||||
NEW: Add contact status in category export
|
||||
NEW: Add Default Warehouse to user record (if module stock is on)
|
||||
NEW: Add employee/user to subledger account list
|
||||
NEW: Add gender in member card
|
||||
NEW: Add getFormatedCustomerRef and getFormatedSupplierRef methods
|
||||
NEW: Add history to view and print previous sales on TakePos.
|
||||
NEW: Add import of accounting account for intra/export selling on product card
|
||||
NEW: Adding code to show update date of supplier price shown
|
||||
NEW: Add line total on list of payments
|
||||
NEW: Add LinkedIn field in social network module
|
||||
NEW: Add more complete error messages in log on stripe payments
|
||||
NEW: Add no_email field in contact list
|
||||
NEW: Add notes are show in tooltips
|
||||
NEW: Add option DONATION_USE_THIRDPARTIES in admin of membership module
|
||||
NEW: Add option STOCK_SHOW_VIRTUAL_STOCK_IN_PRODUCTS_COMBO
|
||||
NEW: add page to setup opening hours of the company
|
||||
NEW: add payments table to pdf of expense report
|
||||
NEW: add payment terms to invoices list
|
||||
NEW: Add picto of deletion on mass action combo lists
|
||||
NEW: add product extrafields available into shipping export
|
||||
NEW: add ref supplier on supplier invoice
|
||||
NEW: Add stats on entries & movements by fiscal year
|
||||
NEW: Add subledger in various payment module
|
||||
NEW: Add tag for ODT generation for localtax rates
|
||||
NEW: Add the now link when creating expense report
|
||||
NEW: Ask date of invoice when using the Clone feature.
|
||||
NEW: auto event msg
|
||||
NEW: Automatically binding for intra/export accountancy code in customer list
|
||||
NEW: automatic / manual selector form
|
||||
NEW: Better explanation for setup of WebDav module
|
||||
NEW: Can add more lines on situation invoices at end of project when there is extra to add.
|
||||
NEW: Can change the customer account of an instance
|
||||
NEW: Can choose the root category to show products for TakePOS module
|
||||
NEW: Can edit supplier on draft order supplier
|
||||
NEW: Can enter price with or without tax when entering expense repor line
|
||||
NEW: Can filter on the date of period for social contributions
|
||||
NEW: Can generate invoices from the timespent entered on a project
|
||||
NEW: Can update product supplier price ref
|
||||
NEW: Can upload files from the edit page of expense report
|
||||
NEW: Color for hover and for checked line is on by default
|
||||
NEW: Column of parent company is available in list of third parties
|
||||
NEW: conditionnal add member button by statut
|
||||
NEW: constant KEEP_DISCOUNT_LINES_FROM_ORIGIN
|
||||
NEW: Contact related items tab
|
||||
NEW: Can create of supplier invoice from a reception
|
||||
NEW: Ensure External RSS Links Open in New Window
|
||||
NEW: Export available for reception module
|
||||
NEW: Extend import option to Order's card and Propal's card
|
||||
NEW: filter by thirdparty on report CA by prod/serv
|
||||
NEW: Save space by moving the meteo on the title line
|
||||
NEW: Get the list of groups of a user with the REST API.
|
||||
NEW: Hidden option MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER to edit supplier on draft supplier order
|
||||
NEW: Improve Displaying Shortcut Access Keys in Navigation.
|
||||
NEW: Improve Expensereport, Inverse Receiver.
|
||||
NEW: Improve pdf description item visibitity.
|
||||
NEW: Introduce a config parameter $dolibarr_main_instance_unique_id
|
||||
NEW: Introduce css "nobottomiftotal"
|
||||
NEW: Introduce PhpSpreadsheet for export (need php5.6+)
|
||||
NEW: Invoice creation from the timesheet
|
||||
NEW: Can list remote stripe's payout in a dedicated page.
|
||||
NEW: Manage account sell_intra & sell_export in page accoutancy admin default product
|
||||
NEW: Manage loan schedule.
|
||||
NEW: Manage status of member types.
|
||||
NEW: Mass action "create bills" for validated reception
|
||||
NEW: Measuring unit are now defined into an editable dictionary. Add product size/unit into product import.
|
||||
NEW: Template pdf 'canelle_reception' displays linked reception lines.
|
||||
NEW: Moral/physic status can be defined at member type level
|
||||
NEW: Pagination into list of time spent.
|
||||
NEW: Performance enhancement (Replace dirname(__FILE__) with __DIR__)
|
||||
NEW: POS support in order (ex: online cart).
|
||||
NEW: Preview of images into the filemanager component.
|
||||
NEW: Resource module can be used in products/services (in a dedicated tab)
|
||||
NEW: Retrieve invoice infos from order when billing shipment
|
||||
NEW: Save and display type of membership in subscription table for more explicit historic
|
||||
NEW: Setup default thirdparty type (customer or prospect/customer)
|
||||
NEW: Add shipping "set draft" button and can update lines.
|
||||
NEW: show in blod, the invoice amount where we came from, when making payment
|
||||
NEW: Show product dimensions in product tooltips.
|
||||
NEW: Show the latest date of subscription in member statistics reports.
|
||||
NEW: Sort list of templates alphabetically
|
||||
NEW: Stripe Payment Intent (need option to use this new Stripe api method)
|
||||
NEW: Can support barcode on supplier price references.
|
||||
NEW: Support tag {ccc} on payment ref
|
||||
NEW: The preview of PDF files generates only 1 png file, even if several pages.
|
||||
NEW: Can select a Thirdparty object in donation module if option ON.
|
||||
NEW: Tooltip with VAT amount and price incl tax on lines of objects.
|
||||
NEW: Unsubscribed emails are now stored in a dedicated table.
|
||||
NEW: Update working chkbxlst filter for lists.
|
||||
NEW: Use ajax switch into setup of donation.php and multi-currency module.
|
||||
NEW: use recipient language when generating the fullname for emails.
|
||||
NEW: When you create product or service, sell accountancy account by default is suggested.
|
||||
NEW: Widget birthdays of the month.
|
||||
NEW: Option in workflow module to set a reception billed on validate supplier bill.
|
||||
NEW: Autocompletion on lists should be available on mobile applications.
|
||||
|
||||
For Developers:
|
||||
NEW: Module "DebugBar" is available as a stable module.
|
||||
NEW: Add API REST for donations
|
||||
NEW: Add a script 'purge-data.php' to purge data older than a defined creation date
|
||||
NEW: Add constant XFRAMEOPTIONS_ALLOWALL
|
||||
NEW: Add function isValidVATID()
|
||||
NEW: ADD document's product support in APIs
|
||||
NEW: REST API: get the list of objects in a category.
|
||||
NEW: Update Stripe library to 6.35
|
||||
NEW: Upgrade jquery lib to 3.3.1
|
||||
NEW: Add hook 'addHtmlHeader()'
|
||||
NEW: Add hook 'createRecurringInvoices()'
|
||||
NEW: Add hook 'afterSelectContactOptions'
|
||||
NEW: Add hook support in accountancy index
|
||||
NEW: Add hook support in list of template invoices
|
||||
NEW: Add parameter 'replaceambiguouschars' on getRandomPassword function
|
||||
NEW: Add property 'noteditable' in modulebuilder
|
||||
NEW: Add the current modulepart into the Conf class object
|
||||
NEW: Add trigger FICHINTER_UNVALIDATE
|
||||
NEW: Add visibility with value 4 in framework to define fields to show
|
||||
NEW: More option to tune initialization of a new module with modulebuilder.
|
||||
NEW: API to list currencies
|
||||
NEW: API Proposal, Orders, Invoices: Add contact details
|
||||
NEW: hidden option to change concat desc order
|
||||
NEW: Enhance management of webhooks
|
||||
NEW: Generation of doc by modulebuilder can include README and CHANGELOG
|
||||
NEW: massfilesarea feature for external modules
|
||||
NEW: Show enabled modules in dol_print_error()
|
||||
NEW: Simplification of CSS styles of default themes.
|
||||
NEW: Clean code of a lot of deprecated code.
|
||||
NEW: Add hidden option to set a search entry to the top
|
||||
NEW: add hidden option DISPLAY_DISCOUNTED_SUPPLIER_PRICE
|
||||
NEW: add hidden option MAIN_DEFAULT_LANGUAGE_FILTER
|
||||
NEW: add hidden option NO_CONCAT_DESCRIPTION
|
||||
NEW: Add hidden option for ACCOUNTANCY_COMBO_FOR_AUX
|
||||
NEW: Add hidden option 'ADD_UNSPLASH_LOGIN_BACKGROUND'
|
||||
NEW: Add Hidden option 'OVERRIDE_VAT_FOR_EXPENSE_REPORT'
|
||||
NEW: add hidden option MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT
|
||||
NEW: Hidden conf to improve pdf desc item visibitity
|
||||
NEW: Look and feel v10 - Add CSS 'tabBarNoTop'
|
||||
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* PHP 5.4 is no more supported. Minimum PHP is now 5.5+.
|
||||
* The PHP extension php-intl is not mandatory but should be installed to have new features working correctly.
|
||||
* The PHP extension php-intl is not mandatory and must be installed to have new features working correctly.
|
||||
* Method GetUrlTrackingStatus were renamed into getUrlTrackingStatus for consistency with naming rules.
|
||||
* API getListOfCivility has been renamed into getListOfCivilities for consistency with naming rules.
|
||||
* Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.;
|
||||
@ -35,6 +174,7 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Removed deprecated use of string in dol_print_date(). Only date allowed.
|
||||
* Deprecated property ->fk_departement is now ->state_id everywhere.
|
||||
* Removed the method 4 of GETPOST (to get $_COOKIE). It was not used and not recommanded to use in Dolibarr.
|
||||
* Column llx_facture.facnumber change to llx_facture.ref
|
||||
|
||||
|
||||
***** ChangeLog for 9.0.3 compared to 9.0.2 *****
|
||||
@ -69,6 +209,7 @@ FIX: Total per day shows 00:00 if the total time spent is equal to 12:00
|
||||
FIX: Update/delete currency on same languages
|
||||
FIX: Wrong variable name make contact of supplier order not used on PDF.
|
||||
FIX: Add hidden option MAIN_PDF_HIDE_SITUATION to hide situation (quick hack to fix output pb).
|
||||
FIX: attached files list with link file was broked
|
||||
|
||||
***** ChangeLog for 9.0.2 compared to 9.0.1 *****
|
||||
FIX: #10822
|
||||
@ -289,6 +430,90 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Remove the no more used and deprecated dol_print_graph function
|
||||
|
||||
|
||||
***** ChangeLog for 8.0.5 compared to 8.0.4 *****
|
||||
FIX: #10381
|
||||
FIX: #10460 compatibility with MariaDB 10.4
|
||||
FIX: #11025
|
||||
FIX: Accountancy - Add transaction with multicompany use all the time 1st entity
|
||||
FIX: Accountancy - Format EBP import
|
||||
FIX: actioncomm export: ORDER BY clause is in wrong export property + event type filter does not work
|
||||
FIX: actioncomm: sort events by date after external calendars and hook
|
||||
FIX: action list: add printFieldListSelect and printFieldListWhere hooks
|
||||
FIX: add fk_unit on addline action
|
||||
FIX: avoid php warning
|
||||
FIX: bad sql request
|
||||
FIX: better method
|
||||
FIX: better test
|
||||
FIX: better test on fetch
|
||||
FIX: broken external authentication module feature and avoid warning
|
||||
FIX: Can not create contract with numbering module without autogen rule
|
||||
FIX: can't add lines on invoices
|
||||
FIX: Can't generate invoice pdf
|
||||
FIX: Can't insert if there is extrafields mandatory on another entity.
|
||||
FIX: Can't insert if there is extrafields mandatory on another entity. FIX: Can't set default value of extrafield of type varchar
|
||||
FIX: Check for old picture name if the new one was not found
|
||||
FIX: Civility not saved when creating a member.
|
||||
FIX: $conf->fournisseur->commande->enabled doesn't exist, we must use $conf->fournisseur->enabled
|
||||
FIX: could not create several superadmin in transversal mode
|
||||
FIX: credit note can have negative value
|
||||
FIX: Default value on sales representative on third party creation
|
||||
FIX: Don't show journal:getNomUrl without data
|
||||
FIX: Erreur dans le Total
|
||||
FIX: error messages not displayed
|
||||
FIX: expedition: reset status on rollback + replace hardcoded status with const
|
||||
FIX: Fix PHP warning "count(): Parameter must be an array..."
|
||||
FIX: fk_default_warehouse missing in group by
|
||||
FIX: function sendEmailsReminder isn't completely developed, then MAIN_FEATURES_LEVEL must be 2 to "use" it
|
||||
FIX: holidays get natural_search if search params are set only
|
||||
FIX: if empty error message, we just see "error" displayed
|
||||
FIX: if(!method_exists(dol_loginfunction))
|
||||
FIX: If we build one invoice for several orders, we must put the ref of order on the line to not lose information.
|
||||
FIX: in fact expensereport must be in $check array
|
||||
FIX: Interface regression for bind people. Fix option MAIN_OPTIMIZEFORTEXTBROWSER
|
||||
FIX: line edit template: keep fk_parent_line
|
||||
FIX: Loan impossible to account
|
||||
FIX: Mark credit note as available for credit note in other currency
|
||||
FIX: missing access security checking with multicompany
|
||||
FIX: missing entity filter and wrong var name
|
||||
FIX: missing entity filter in function "build_filterField()" (export)
|
||||
FIX: Missing field in import/export of users
|
||||
FIX: missing hook completeTabsHead in margins module
|
||||
FIX: missing $ismultientitymanaged for previous/next ref
|
||||
FIX: Missing province in export of invoice
|
||||
FIX: multicompany compatibility
|
||||
FIX: must fetch member in current entity
|
||||
FIX: need an order by in case we found other invoice with same number but not same date
|
||||
FIX: need to round with 2 decimals to avoid movements not correctly balanced
|
||||
FIX: no need to test anything to display documents tabs on expense report
|
||||
FIX: positive values creating diff on addline rounding
|
||||
FIX: problem with multicompany transverse mode
|
||||
FIX: Product accountancey sell intra code must be visible if main feature level 1
|
||||
FIX: project_title for display of getNomUrl()
|
||||
FIX: quick search for supplier orders
|
||||
FIX: Remane of project
|
||||
FIX: same thing here
|
||||
FIX: Selection of email recipient with option MAIN_OPTIMIZEFORTEXTBROWSER
|
||||
FIX: several hooks in shipping/delivery cards
|
||||
FIX: shipping default warehouse if only one warehouse
|
||||
FIX: SQL injection on rowid of dict.php
|
||||
FIX: 'statut' is ignored when updating a user with the REST API.
|
||||
FIX: supplier invoice payment total dont care about deposit or credit
|
||||
FIX: supplier invoice product stats total ht is line total not invoice total
|
||||
FIX: The minimum amount filter does not work in the VAT report per customer
|
||||
FIX: Total per day shows 00:00 if the total time spent is equal to 12:00
|
||||
FIX: Update/delete currency on same languages
|
||||
FIX: [URGENT] broken feature, "$usercancreate" is for Dolibarr 9
|
||||
FIX: useless join
|
||||
FIX: we need to keep originline special_code
|
||||
FIX: we want to be able to reopen fourn credit note
|
||||
FIX: when 2 extra fields are mandatory in 2 different entities
|
||||
FIX: when we add a payment on an invoice which already has payments with credit note or deposit amount, and then we get an excess received, discount amount must be $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
||||
FIX: when we create deposit with multi tva, we mustn't add line if amount = 0 (example when we have a 100% reduc on one of origin invoice line)
|
||||
FIX: wrong redirect link on holiday refuse
|
||||
FIX: wrong test enabled
|
||||
FIX: Wrong variable name
|
||||
FIX: XSS
|
||||
|
||||
***** ChangeLog for 8.0.4 compared to 8.0.3 *****
|
||||
FIX: #10030 better german chart
|
||||
FIX: #10036
|
||||
|
||||
@ -357,7 +357,7 @@ if ($nboftargetok) {
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n";
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'. But you can regenerate it with command:\n";
|
||||
}
|
||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||
{
|
||||
|
||||
14
build/phpstan/bootstrap.php
Normal file
14
build/phpstan/bootstrap.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// Example to use PHPStan
|
||||
// cd git/dolibarr
|
||||
// /usr/bin/php7.2 ../phpstan.phar -l1 analyze htdocs/societe/website.php --memory-limit 2G
|
||||
|
||||
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
|
||||
define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
|
||||
define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
|
||||
define('DOL_URL_ROOT', '/');
|
||||
|
||||
// Load the main.inc.php file to have finctions llx_Header and llx_Footer defined
|
||||
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
|
||||
global $conf, $langs, $user, $db;
|
||||
include_once __DIR__ . '/../../htdocs/main.inc.php';
|
||||
@ -247,11 +247,10 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">' . $langs->trans("Addanaccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create');
|
||||
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Box to select active chart of account
|
||||
print $langs->trans("Selectchartofaccounts") . " : ";
|
||||
|
||||
@ -111,14 +111,9 @@ if ($result)
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (! empty($user->rights->accounting->fiscalyear))
|
||||
{
|
||||
$addbutton = '<a class="butActionNew" href="fiscalyear_card.php?action=create"><span class="valignmiddle text-plus-circle">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$addbutton = '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
|
||||
$addbutton.= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->rights->accounting->fiscalyear);
|
||||
|
||||
|
||||
$title = $langs->trans('AccountingPeriods');
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $addbutton, '', $limit, 1);
|
||||
|
||||
@ -443,19 +443,18 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
$listofformat=AccountancyExport::getType();
|
||||
$button = '<a class="butAction" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">';
|
||||
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
|
||||
else $button.= $langs->trans("ExportList");
|
||||
//$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
|
||||
$button.= '</a>';
|
||||
|
||||
if (count($filter)) $buttonLabel = $langs->trans("ExportFilteredList");
|
||||
else $buttonLabel = $langs->trans("ExportList");
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($buttonLabel, '', 'fa fa-file-export', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:''));
|
||||
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-object-group', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param);
|
||||
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle', './card.php?action=create');
|
||||
|
||||
|
||||
$groupby = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param.'">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$newcardbutton, '', $limit);
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
@ -256,10 +256,8 @@ if ($action == 'delbookkeepingyear') {
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
|
||||
$viewflat = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param.'">' . $langs->trans("ViewFlatList") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle', './card.php?action=create');
|
||||
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
|
||||
@ -50,6 +50,7 @@ class AccountancyExport
|
||||
public static $EXPORT_TYPE_COGILOG = 8;
|
||||
public static $EXPORT_TYPE_AGIRIS = 9;
|
||||
public static $EXPORT_TYPE_FEC = 11;
|
||||
public static $EXPORT_TYPE_OPENCONCERTO = 12;
|
||||
|
||||
|
||||
/**
|
||||
@ -103,6 +104,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
|
||||
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
|
||||
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'),
|
||||
self::$EXPORT_TYPE_OPENCONCERTO => $langs->trans('Modelcsv_openconcerto'),
|
||||
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
||||
);
|
||||
}
|
||||
@ -126,6 +128,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_EBP => 'ebp',
|
||||
self::$EXPORT_TYPE_COGILOG => 'cogilog',
|
||||
self::$EXPORT_TYPE_AGIRIS => 'agiris',
|
||||
self::$EXPORT_TYPE_OPENCONCERTO => 'openconcerto',
|
||||
self::$EXPORT_TYPE_FEC => 'fec',
|
||||
);
|
||||
|
||||
@ -187,6 +190,10 @@ class AccountancyExport
|
||||
'label' => $langs->trans('Modelcsv_FEC'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||
),
|
||||
self::$EXPORT_TYPE_OPENCONCERTO => array(
|
||||
'label' => $langs->trans('Modelcsv_openconcerto'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'csv',
|
||||
),
|
||||
),
|
||||
'cr'=> array (
|
||||
'1' => $langs->trans("Unix"),
|
||||
@ -248,6 +255,9 @@ class AccountancyExport
|
||||
case self::$EXPORT_TYPE_AGIRIS :
|
||||
$this->exportAgiris($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_OPENCONCERTO :
|
||||
$this->exportOpenConcerto($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_FEC :
|
||||
$this->exportFEC($TData);
|
||||
break;
|
||||
@ -588,6 +598,39 @@ class AccountancyExport
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export format : OpenConcerto
|
||||
*
|
||||
* @param array $objectLines data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function exportOpenConcerto($objectLines)
|
||||
{
|
||||
|
||||
$separator = ';';
|
||||
$end_line = "\n";
|
||||
|
||||
foreach ($objectLines as $line) {
|
||||
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
|
||||
print $date . $separator;
|
||||
print $line->code_journal;
|
||||
if (empty($line->subledger_account)) {
|
||||
print length_accountg($line->numero_compte) . $separator;
|
||||
} else {
|
||||
print length_accounta($line->subledger_account) . $separator;
|
||||
}
|
||||
print $line->doc_ref . $separator;
|
||||
print $line->label_operation . $separator;
|
||||
print price($line->debit) . $separator;
|
||||
print price($line->credit) . $separator;
|
||||
|
||||
print $end_line;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export format : Configurable
|
||||
*
|
||||
|
||||
@ -151,9 +151,7 @@ if ($object->id > 0)
|
||||
$newcardbutton = '';
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id.'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id);
|
||||
}
|
||||
|
||||
if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) ))
|
||||
|
||||
@ -365,9 +365,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMember').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create');
|
||||
}
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -247,9 +247,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/list.php?status=-1,1"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewSubscription').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/list.php?status=-1,1');
|
||||
}
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -236,10 +236,8 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->configurer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/type.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMemberType').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewMemberType'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/type.php?action=create');
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -271,7 +271,7 @@ if ($action == 'addthumb') // Regenerate thumbs
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
|
||||
dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_WARNING);
|
||||
dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_INFO);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -412,9 +412,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
}
|
||||
|
||||
// Logo
|
||||
print '<tr class="oddeven hideonsmartphone"><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
||||
print '<tr class="oddeven"><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||
print '<input type="file" class="flat class=minwidth200" name="logo" id="logo">';
|
||||
print '<input type="file" class="flat class=minwidth200" name="logo" id="logo" accept="image/*">';
|
||||
print '</td><td class="nocellnopadd right" valign="middle">';
|
||||
if (! empty($mysoc->logo_mini)) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
||||
@ -798,9 +798,9 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Barcode
|
||||
|
||||
if (! empty($conf->barcode->enabled))
|
||||
{
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Gencod").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -77,10 +77,17 @@ $form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("DebugBarSetup"), $linkback, 'title_setup');
|
||||
print '<br>';
|
||||
|
||||
//print load_fiche_titre($langs->trans("DebugBar"));
|
||||
|
||||
if (! function_exists('mb_check_encoding'))
|
||||
{
|
||||
$langs->load("errors");
|
||||
print info_admin($langs->trans("ErrorPHPNeedModule", 'mbstring'), 0, 0, 'error');
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Level
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -322,9 +322,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
$newcardbutton='';
|
||||
//if ($user->rights->emailcollector->creer)
|
||||
//{
|
||||
$newcardbutton='<a class="butActionNew" href="emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']));
|
||||
//}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit);
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2011-2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -55,7 +55,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
if ($action == 'updateMask')
|
||||
{
|
||||
$maskconst = GETPOST('maskconstholidaty', 'alpha');
|
||||
$maskconst = GETPOST('maskconstholiday', 'alpha');
|
||||
$maskvalue = GETPOST('maskholiday', 'alpha');
|
||||
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
|
||||
@ -256,9 +256,7 @@ if ($action == 'delete')
|
||||
$newcardbutton='';
|
||||
if ($user->admin)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'&backtopage='.urlencode($_SERVER['PHP_SELF']));
|
||||
}
|
||||
|
||||
print '<form name="newmenu" class="nocellnopadd" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -34,9 +34,11 @@ if (! $user->admin) accessforbidden();
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (preg_match('/set(.*)/', $action, $reg))
|
||||
{
|
||||
if (! dolibarr_set_const($db, $reg[1], '1', 'chaine', 0, '', $conf->entity) > 0)
|
||||
@ -47,7 +49,7 @@ if (preg_match('/set(.*)/', $action, $reg))
|
||||
|
||||
if (preg_match('/del(.*)/', $action, $reg))
|
||||
{
|
||||
if (! dolibarr_del_const($db, $reg[1], $conf->entity) > 0)
|
||||
if (! dolibarr_set_const($db, $reg[1], '0', 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
@ -87,7 +89,7 @@ $workflowcodes=array(
|
||||
// Automatic classification supplier order
|
||||
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array('family'=>'classify_supplier_order', 'position'=>62, 'enabled'=>'! empty($conf->fournisseur->enabled)', 'picto'=>'order','warning'=>''),
|
||||
//Automatic classification reception
|
||||
'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>30, 'enabled'=>'! empty($conf->reception->enabled) && ! empty($conf->fournisseur->enabled)', 'picto'=>'bill'),
|
||||
'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>64, 'enabled'=>'! empty($conf->reception->enabled) && ! empty($conf->fournisseur->enabled)', 'picto'=>'bill'),
|
||||
);
|
||||
|
||||
if (! empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow']))
|
||||
|
||||
261
htdocs/bom/bom_agenda.php
Normal file
261
htdocs/bom/bom_agenda.php
Normal file
@ -0,0 +1,261 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/modulebuilder/template/myobject_agenda.php
|
||||
* \ingroup bom
|
||||
* \brief Page of MyObject events
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
$res=0;
|
||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
||||
if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res=@include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
|
||||
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
|
||||
$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;
|
||||
while($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; }
|
||||
if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/main.inc.php")) $res=@include substr($tmp, 0, ($i+1))."/main.inc.php";
|
||||
if (! $res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i+1)))."/main.inc.php")) $res=@include dirname(substr($tmp, 0, ($i+1)))."/main.inc.php";
|
||||
// Try main.inc.php using relative path
|
||||
if (! $res && file_exists("../main.inc.php")) $res=@include "../main.inc.php";
|
||||
if (! $res && file_exists("../../main.inc.php")) $res=@include "../../main.inc.php";
|
||||
if (! $res && file_exists("../../../main.inc.php")) $res=@include "../../../main.inc.php";
|
||||
if (! $res) die("Include of main fails");
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
dol_include_once('/bom/class/bom.class.php');
|
||||
dol_include_once('/bom/lib/bom.lib.php');
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mrp","other"));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
if (GETPOST('actioncode', 'array'))
|
||||
{
|
||||
$actioncode=GETPOST('actioncode', 'array', 3);
|
||||
if (! count($actioncode)) $actioncode='0';
|
||||
}
|
||||
else
|
||||
{
|
||||
$actioncode=GETPOST("actioncode", "alpha", 3)?GETPOST("actioncode", "alpha", 3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
||||
}
|
||||
$search_agenda_label=GETPOST('search_agenda_label');
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->societe_id > 0) access_forbidden();
|
||||
//if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
//$result = restrictedArea($user, 'bom', $id);
|
||||
|
||||
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$page = GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield='a.datep,a.id';
|
||||
if (! $sortorder) $sortorder='DESC';
|
||||
|
||||
// Initialize technical objects
|
||||
$object=new BOM($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction=$conf->bom->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('bomagenda','globalcard')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('bom');
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
if ($id > 0 || ! empty($ref)) $upload_dir = $conf->bom->multidir_output[$object->entity] . "/" . $object->id;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array('id'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Cancel
|
||||
if (GETPOST('cancel', 'alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$actioncode='';
|
||||
$search_agenda_label='';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$contactstatic = new Contact($db);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$title=$langs->trans("Agenda");
|
||||
//if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
|
||||
$help_url = '';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
||||
$head = bomPrepareHead($object);
|
||||
|
||||
|
||||
dol_fiche_head($head, 'agenda', $langs->trans("BillOfMaterials"), -1, 'bom');
|
||||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="' .dol_buildpath('/bom/myobject_list.php', 1) . '?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
/*
|
||||
// Ref customer
|
||||
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
if ($user->rights->bom->creer)
|
||||
{
|
||||
if ($action != 'classify')
|
||||
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||
$morehtmlref.=' : ';
|
||||
if ($action == 'classify') {
|
||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||
$morehtmlref.='</form>';
|
||||
} else {
|
||||
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||
}
|
||||
} else {
|
||||
if (! empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
$proj->fetch($object->fk_project);
|
||||
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||
$morehtmlref.=$proj->ref;
|
||||
$morehtmlref.='</a>';
|
||||
} else {
|
||||
$morehtmlref.='';
|
||||
}
|
||||
}
|
||||
}*/
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
$object->info($object->id);
|
||||
print dol_print_object_info($object, 1);
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
|
||||
// Actions buttons
|
||||
|
||||
$objthirdparty=$object;
|
||||
$objcon=new stdClass();
|
||||
|
||||
$out='';
|
||||
$permok=$user->rights->agenda->myactions->create;
|
||||
if ((! empty($objthirdparty->id) || ! empty($objcon->id)) && $permok)
|
||||
{
|
||||
//$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
if (get_class($objthirdparty) == 'Societe') $out.='&socid='.$objthirdparty->id;
|
||||
$out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1';
|
||||
//$out.=$langs->trans("AddAnAction").' ';
|
||||
//$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||
//$out.="</a>";
|
||||
}
|
||||
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create))
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) ))
|
||||
{
|
||||
$param='&socid='.$socid;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
|
||||
//print load_fiche_titre($langs->trans("ActionsOnBom"), '', '');
|
||||
|
||||
// List of all actions
|
||||
$filters=array();
|
||||
$filters['search_agenda_label']=$search_agenda_label;
|
||||
|
||||
// TODO Replace this with same code than into list.php
|
||||
//show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@ -82,12 +82,8 @@ $userstatic=new User($db);
|
||||
llxHeader('', $langs->trans("ListOfBookmarks"));
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->bookmark->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewBookmark').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewBookmark'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer));
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton);
|
||||
|
||||
|
||||
@ -65,9 +65,7 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css')
|
||||
|
||||
llxHeader('', $title, '', '', 0, 0, $arrayofjs, $arrayofcss);
|
||||
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewCategory").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type));
|
||||
|
||||
print load_fiche_titre($title, $newcardbutton);
|
||||
|
||||
|
||||
@ -435,9 +435,7 @@ if ($resql)
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec='100000';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')));
|
||||
}
|
||||
|
||||
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit);
|
||||
|
||||
@ -367,9 +367,7 @@ if ($user->rights->agenda->myactions->create || $user->rights->agenda->allaction
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec='100000';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')));
|
||||
}
|
||||
|
||||
$link='';
|
||||
|
||||
@ -156,9 +156,7 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->mailing->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/mailing/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMailing').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewMailing'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/mailing/card.php?action=create');
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
|
||||
@ -429,9 +429,9 @@ if ($resql)
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
if ($user->rights->propal->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if ($user->rights->propal->cloturer) $arrayofmassactions['closed']=$langs->trans("Close");
|
||||
@ -441,10 +441,8 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->propal->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewPropal').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/propal/card.php?action=create');
|
||||
}
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@ -806,7 +804,7 @@ if ($resql)
|
||||
|
||||
if (! empty($arrayfields['pr.title']['checked']))
|
||||
{
|
||||
// Project ref
|
||||
// Project label
|
||||
print '<td class="nowrap">';
|
||||
if ($obj->project_id > 0) {
|
||||
print $projectstatic->title;
|
||||
|
||||
@ -499,7 +499,7 @@ class Commande extends CommonOrder
|
||||
return -1;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -1685,7 +1685,7 @@ class Commande extends CommonOrder
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON c.fk_cond_reglement = cr.rowid';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON c.fk_mode_reglement = p.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON c.fk_availability = ca.rowid';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON c.fk_input_reason = ca.rowid';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON c.fk_input_reason = dr.rowid';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';
|
||||
|
||||
if ($id) $sql.= " WHERE c.rowid=".$id;
|
||||
|
||||
@ -430,11 +430,10 @@ if ($resql)
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'cancelorders'=>$langs->trans("Cancel"),
|
||||
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
if($user->rights->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||
if ($user->rights->commande->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
@ -444,10 +443,8 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($contextpage == 'orderlist' && $user->rights->commande->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/commande/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/commande/card.php?action=create');
|
||||
}
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||
@ -50,14 +50,14 @@ $id = (GETPOST('id')?GETPOST('id', 'int'):GETPOST("facid", "int")); // For b
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$sref = GETPOST('sref');
|
||||
$sref_client = GETPOST('sref_client');
|
||||
$sref = GETPOST('sref', 'alpha');
|
||||
$sref_client = GETPOST('sref_client', 'alpha');
|
||||
$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$selected = GETPOST('orders_to_invoice');
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$viewstatut = GETPOST('viewstatut');
|
||||
$viewstatut = GETPOST('viewstatut', 'alpha');
|
||||
|
||||
$error = 0;
|
||||
|
||||
@ -290,32 +290,32 @@ if (($action == 'create' || $action == 'add') && !$error)
|
||||
$array_options = $lines[$i]->array_options;
|
||||
}
|
||||
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$ii,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line,
|
||||
$lines[$i]->fk_fournprice,
|
||||
$lines[$i]->pa_ht,
|
||||
$lines[$i]->label,
|
||||
$array_options
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$ii,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line,
|
||||
$lines[$i]->fk_fournprice,
|
||||
$lines[$i]->pa_ht,
|
||||
$lines[$i]->label,
|
||||
$array_options
|
||||
);
|
||||
if ($result > 0)
|
||||
{
|
||||
@ -578,9 +578,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
{
|
||||
$sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\'';
|
||||
}
|
||||
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
|
||||
$resql = $db->query($sql);
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($socid)
|
||||
@ -604,6 +604,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
print '<h3>'.$companystatic->getNomUrl(1, 'customer').'</h3>';
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.ref', '', '&socid='.$socid, '', $sortfield, $sortorder);
|
||||
@ -618,8 +619,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
print '<form method="get" action="orderstoinvoice.php">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
|
||||
//REF
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="sref" value="'.$sref.'">';
|
||||
print '</td>';
|
||||
|
||||
@ -668,11 +670,11 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
$generic_commande->date_livraison = $db->jdate($objp->date_livraison);
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print '<td class="nobordernopadding nowraponall">';
|
||||
print $generic_commande->getNomUrl(1, 0);
|
||||
print '</td>';
|
||||
|
||||
print '<td width="20" class="nobordernopadding nowrap">';
|
||||
print '<td width="20" class="nobordernopadding nowraponall">';
|
||||
if ($generic_commande->hasDelay()) {
|
||||
print img_picto($langs->trans("Late"), "warning");
|
||||
}
|
||||
@ -713,10 +715,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
$i++;
|
||||
}
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
* Boutons actions
|
||||
*/
|
||||
// Buttons actions
|
||||
print '<br><div class="center"><input type="checkbox" '.(empty($conf->global->INVOICE_CLOSE_ORDERS_OFF_BY_DEFAULT_FORMASSINVOICE)?' checked="checked"':'').' name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
|
||||
print '<div class="right">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
@ -726,7 +727,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
print '<input type="submit" class="butAction" value="'.$langs->trans("GenerateBill").'">';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
|
||||
@ -756,34 +756,16 @@ if ($resql)
|
||||
{
|
||||
if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments
|
||||
{
|
||||
if ($user->rights->banque->modifier) {
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
} else {
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)), '', $user->rights->banque->modifier);
|
||||
}
|
||||
else // If direct entries is not done using miscellaneous payments
|
||||
else // If direct entries is not done using miscellaneous payments
|
||||
{
|
||||
if ($user->rights->banque->modifier) {
|
||||
$newcardbutton = '<a class="butActionNew" href="'.$_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param.'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
} else {
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', $user->rights->banque->modifier);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("FeatureDisabled").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -227,9 +227,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->banque->configurer)
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewFinancialAccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -4656,6 +4656,14 @@ elseif ($id > 0 || ! empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
// POS Ticket
|
||||
if (! empty($conf->takepos->enabled) && $object->module_source == 'takepos')
|
||||
{
|
||||
$langs->load("cashdesk");
|
||||
$receipt_url=DOL_URL_ROOT."/takepos/receipt.php";
|
||||
print '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="' . $receipt_url . '?facid=' . $object->id.'">' . $langs->trans('POSTicket') .'</a></div>';
|
||||
}
|
||||
|
||||
// Create payment
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $usercanissuepayment) {
|
||||
if ($objectidnext) {
|
||||
@ -4700,13 +4708,6 @@ elseif ($id > 0 || ! empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
// POS Ticket
|
||||
if (! empty($conf->takepos->enabled) && $object->module_source != '')
|
||||
{
|
||||
$receipt_url=DOL_URL_ROOT."/takepos/receipt.php";
|
||||
print '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="' . $receipt_url . '?facid=' . $object->id.'">' . $langs->trans('POSTicket') .'</a></div>';
|
||||
}
|
||||
|
||||
// Classify paid
|
||||
if ($object->statut == 1 && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0))
|
||||
|| ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id))
|
||||
|
||||
@ -73,10 +73,10 @@ class Invoices extends DolibarrApi
|
||||
}
|
||||
|
||||
// Get payment details
|
||||
$this->invoice->totalpaye = $this->invoice->getSommePaiement();
|
||||
$this->invoice->totalpaid = $this->invoice->getSommePaiement();
|
||||
$this->invoice->totalcreditnotes = $this->invoice->getSumCreditNotesUsed();
|
||||
$this->invoice->totaldeposits = $this->invoice->getSumDepositsUsed();
|
||||
$this->invoice->resteapayer = price2num($this->invoice->total_ttc - $this->invoice->totalpaye - $this->invoice->totalcreditnotes - $this->invoice->totaldeposits, 'MT');
|
||||
$this->invoice->remaintopay = price2num($this->invoice->total_ttc - $this->invoice->totalpaid - $this->invoice->totalcreditnotes - $this->invoice->totaldeposits, 'MT');
|
||||
|
||||
if (! DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
|
||||
@ -2532,7 +2532,6 @@ class Facture extends CommonInvoice
|
||||
return true;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Set draft status
|
||||
*
|
||||
@ -2540,7 +2539,7 @@ class Facture extends CommonInvoice
|
||||
* @param int $idwarehouse Id warehouse to use for stock change.
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setDraft($user, $idwarehouse = -1)
|
||||
public function setDraft($user, $idwarehouse = -1)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
@ -2549,11 +2548,11 @@ class Facture extends CommonInvoice
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
dol_syslog(get_class($this)."::set_draft already draft status", LOG_WARNING);
|
||||
dol_syslog(__METHOD__." already draft status", LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -2564,10 +2563,10 @@ class Facture extends CommonInvoice
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if (! $error)
|
||||
{
|
||||
$this->oldcopy= clone $this;
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$this->oldcopy= clone $this;
|
||||
}
|
||||
|
||||
// Si on decremente le produit principal et ses composants a la validation de facture, on réincrement
|
||||
if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL))
|
||||
@ -2595,15 +2594,15 @@ class Facture extends CommonInvoice
|
||||
$this->brouillon = 1;
|
||||
$this->statut = self::STATUS_DRAFT;
|
||||
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('BILL_UNVALIDATE', $user);
|
||||
if ($result < 0)
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('BILL_UNVALIDATE', $user);
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
$this->statut=$old_statut;
|
||||
$this->brouillon=0;
|
||||
}
|
||||
// End call triggers
|
||||
// End call triggers
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
|
||||
@ -607,9 +607,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if($user->rights->facture->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewBill').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/facture/card.php?action=create');
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
@ -1045,7 +1043,7 @@ if ($resql)
|
||||
// Project ref
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
print '<td class="nocellnopadd nowrap">';
|
||||
if ($obj->project_id > 0)
|
||||
{
|
||||
print $projectstatic->getNomUrl(1);
|
||||
|
||||
@ -45,9 +45,7 @@ $localtax_static = new Localtax($db);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt.'"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewLocalTaxPayment', ($ltt+1)).'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt+1)), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt);
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->transcountry($ltt==2?"LT2Payments":"LT1Payments", $mysoc->country_code), $newcardbutton);
|
||||
|
||||
@ -222,19 +222,26 @@ if (empty($reshook))
|
||||
if ($socid > 0) $thirdparty->fetch($socid);
|
||||
|
||||
// Clean parameters amount if payment is for a credit note
|
||||
if (GETPOST('type') == Facture::TYPE_CREDIT_NOTE)
|
||||
foreach ($amounts as $key => $value) // How payment is dispatched
|
||||
{
|
||||
foreach ($amounts as $key => $value) // How payment is dispatch
|
||||
{
|
||||
$newvalue = price2num($value, 'MT');
|
||||
$amounts[$key] = -$newvalue;
|
||||
}
|
||||
$tmpinvoice = new Facture($db);
|
||||
$tmpinvoice->fetch($key);
|
||||
if ($tmpinvoice->type == Facture::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
$newvalue = price2num($value, 'MT');
|
||||
$amounts[$key] = - abs($newvalue);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($multicurrency_amounts as $key => $value) // How payment is dispatch
|
||||
{
|
||||
$newvalue = price2num($value, 'MT');
|
||||
$multicurrency_amounts[$key] = -$newvalue;
|
||||
}
|
||||
foreach ($multicurrency_amounts as $key => $value) // How payment is dispatched
|
||||
{
|
||||
$tmpinvoice = new Facture($db);
|
||||
$tmpinvoice->fetch($key);
|
||||
if ($tmpinvoice->type == Facture::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
$newvalue = price2num($value, 'MT');
|
||||
$multicurrency_amounts[$key] = - abs($newvalue);
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($conf->banque->enabled))
|
||||
@ -544,7 +551,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
$sql.= ') AND f.paye = 0';
|
||||
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => not validated, Statut=2 => canceled
|
||||
if ($facture->type != 2)
|
||||
if ($facture->type != Facture::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
$sql .= ' AND type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation
|
||||
}
|
||||
@ -552,7 +559,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
{
|
||||
$sql .= ' AND type = 2'; // If paying back a credit note, we show all credit notes
|
||||
}
|
||||
|
||||
// Sort invoices by date and serial number: the older one comes first
|
||||
$sql.=' ORDER BY f.datef ASC, f.ref ASC';
|
||||
|
||||
@ -562,9 +568,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num > 0)
|
||||
{
|
||||
$sign=1;
|
||||
if ($facture->type == 2) $sign=-1;
|
||||
|
||||
$arraytitle=$langs->trans('Invoice');
|
||||
if ($facture->type == 2) $arraytitle=$langs->trans("CreditNotes");
|
||||
$alreadypayedlabel=$langs->trans('Received');
|
||||
@ -606,6 +609,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$sign=1;
|
||||
if ($facture->type == Facture::TYPE_CREDIT_NOTE) $sign=-1;
|
||||
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($objp->socid);
|
||||
|
||||
@ -631,7 +637,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
print '<td>';
|
||||
print $invoice->getNomUrl(1, '');
|
||||
if($objp->socid != $facture->thirdparty->id) print ' - '.$soc->getNomUrl(1).' ';
|
||||
if ($objp->socid != $facture->thirdparty->id) print ' - '.$soc->getNomUrl(1).' ';
|
||||
print "</td>\n";
|
||||
|
||||
// Date
|
||||
|
||||
@ -138,9 +138,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->banque->cheque)
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewCheckDeposit').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new');
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -108,9 +108,7 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->prelevement->bons->creer)
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/prelevement/create.php"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewStandingOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php');
|
||||
}
|
||||
|
||||
// Lines of title fields
|
||||
|
||||
@ -150,10 +150,8 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/tva/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewVATPayment').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt+1)), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/tva/card.php?action=create');
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -261,9 +261,7 @@ else
|
||||
{
|
||||
if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create))
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -455,9 +455,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contact/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewContactAddress').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create');
|
||||
}
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014-2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
@ -46,19 +46,19 @@ $confirm=GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'contractlist'; // To manage different context of search
|
||||
|
||||
$search_name=GETPOST('search_name');
|
||||
$search_email=GETPOST('search_email');
|
||||
$search_name=GETPOST('search_name', 'alpha');
|
||||
$search_email=GETPOST('search_email', 'alpha');
|
||||
$search_town=GETPOST('search_town', 'alpha');
|
||||
$search_zip=GETPOST('search_zip', 'alpha');
|
||||
$search_state=trim(GETPOST("search_state"));
|
||||
$search_state=trim(GETPOST("search_state", 'alpha'));
|
||||
$search_country=GETPOST("search_country", 'int');
|
||||
$search_type_thirdparty=GETPOST("search_type_thirdparty", 'int');
|
||||
$search_contract=GETPOST('search_contract');
|
||||
$search_contract=GETPOST('search_contract', 'alpha');
|
||||
$search_ref_customer=GETPOST('search_ref_customer', 'alpha');
|
||||
$search_ref_supplier=GETPOST('search_ref_supplier', 'alpha');
|
||||
$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
||||
$search_status=GETPOST('search_status');
|
||||
$socid=GETPOST('socid');
|
||||
$search_status=GETPOST('search_status', 'alpha');
|
||||
$socid=GETPOST('socid', 'int');
|
||||
$search_user=GETPOST('search_user', 'int');
|
||||
$search_sale=GETPOST('search_sale', 'int');
|
||||
$search_product_category=GETPOST('search_product_category', 'int');
|
||||
@ -365,9 +365,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
@ -376,9 +376,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->contrat->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewContractSubscription').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewContractSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contrat/card.php?action=create');
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
@ -709,8 +707,8 @@ while ($i < min($num, $limit))
|
||||
$listsalesrepresentatives=$socstatic->getSalesRepresentatives($user);
|
||||
if ($listsalesrepresentatives < 0) dol_print_error($db);
|
||||
$nbofsalesrepresentative=count($listsalesrepresentatives);
|
||||
if ($nbofsalesrepresentative > 3) {
|
||||
// We print only number
|
||||
if ($nbofsalesrepresentative > 3) {
|
||||
// We print only number
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$socstatic->id.'">';
|
||||
print $nbofsalesrepresentative;
|
||||
print '</a>';
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -47,11 +48,11 @@ if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
$mode = GETPOST("mode");
|
||||
$filter=GETPOST("filter");
|
||||
$search_name=GETPOST("search_name");
|
||||
$search_contract=GETPOST("search_contract");
|
||||
$search_service=GETPOST("search_service");
|
||||
$search_status=GETPOST("search_status", "alpha");
|
||||
$statut=GETPOST('statut')?GETPOST('statut'):1;
|
||||
$search_name=GETPOST("search_name", 'alpha');
|
||||
$search_contract=GETPOST("search_contract", 'alpha');
|
||||
$search_service=GETPOST("search_service", 'alpha');
|
||||
$search_status=GETPOST("search_status", 'alpha');
|
||||
$statut=GETPOST('statut', 'int')?GETPOST('statut', 'int'):1;
|
||||
$search_product_category=GETPOST('search_product_category', 'int');
|
||||
$socid=GETPOST('socid', 'int');
|
||||
$contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'contractservicelist'.$mode;
|
||||
@ -61,20 +62,20 @@ $opouvertureprevueday=GETPOST('opouvertureprevueday');
|
||||
$opouvertureprevueyear=GETPOST('opouvertureprevueyear');
|
||||
$filter_opouvertureprevue=GETPOST('filter_opouvertureprevue');
|
||||
|
||||
$op1month=GETPOST('op1month');
|
||||
$op1day=GETPOST('op1day');
|
||||
$op1year=GETPOST('op1year');
|
||||
$filter_op1=GETPOST('filter_op1');
|
||||
$op1month=GETPOST('op1month', 'int');
|
||||
$op1day=GETPOST('op1day', 'int');
|
||||
$op1year=GETPOST('op1year', 'int');
|
||||
$filter_op1=GETPOST('filter_op1', 'alpha');
|
||||
|
||||
$op2month=GETPOST('op2month');
|
||||
$op2day=GETPOST('op2day');
|
||||
$op2year=GETPOST('op2year');
|
||||
$filter_op2=GETPOST('filter_op2');
|
||||
$op2month=GETPOST('op2month', 'int');
|
||||
$op2day=GETPOST('op2day', 'int');
|
||||
$op2year=GETPOST('op2year', 'int');
|
||||
$filter_op2=GETPOST('filter_op2', 'alpha');
|
||||
|
||||
$opcloturemonth=GETPOST('opcloturemonth');
|
||||
$opclotureday=GETPOST('opclotureday');
|
||||
$opclotureyear=GETPOST('opclotureyear');
|
||||
$filter_opcloture=GETPOST('filter_opcloture');
|
||||
$opcloturemonth=GETPOST('opcloturemonth', 'int');
|
||||
$opclotureday=GETPOST('opclotureday', 'int');
|
||||
$opclotureyear=GETPOST('opclotureyear', 'int');
|
||||
$filter_opcloture=GETPOST('filter_opcloture', 'alpha');
|
||||
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
|
||||
@ -138,7 +138,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
$tooltip = $langs->trans('SupplierInvoice') . ': ' . ($objp->ref?$objp->ref:$objp->facid) . '<br>' . $langs->trans('RefSupplier') . ': ' . $objp->ref_supplier;
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => '',
|
||||
'td' => 'class="nowraponall"',
|
||||
'text' => $facturestatic->getNomUrl(1),
|
||||
'text2'=> $late,
|
||||
'asis' => 1
|
||||
|
||||
@ -1227,12 +1227,12 @@ abstract class CommonObject
|
||||
$result=array();
|
||||
$i=0;
|
||||
//cas particulier pour les expeditions
|
||||
if($this->element=='shipping' && $this->origin_id != 0) {
|
||||
if ($this->element=='shipping' && $this->origin_id != 0) {
|
||||
$id=$this->origin_id;
|
||||
$element='commande';
|
||||
} elseif($this->element=='reception' && $this->origin_id != 0) {
|
||||
$id=$this->origin_id;
|
||||
$element='order_supplier';
|
||||
} elseif ($this->element=='reception' && $this->origin_id != 0) {
|
||||
$id=$this->origin_id;
|
||||
$element='order_supplier';
|
||||
} else {
|
||||
$id=$this->id;
|
||||
$element=$this->element;
|
||||
@ -2086,25 +2086,25 @@ abstract class CommonObject
|
||||
* Change the shipping method
|
||||
*
|
||||
* @param int $shipping_method_id Id of shipping method
|
||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||
* @param User $userused Object user
|
||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||
* @param User $userused Object user
|
||||
*
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function setShippingMethod($shipping_method_id, $notrigger = false, $userused = null)
|
||||
{
|
||||
global $user;
|
||||
global $user;
|
||||
|
||||
if (empty($userused)) $userused=$user;
|
||||
if (empty($userused)) $userused=$user;
|
||||
|
||||
$error = 0;
|
||||
$error = 0;
|
||||
|
||||
if (! $this->table_element) {
|
||||
dol_syslog(get_class($this)."::setShippingMethod was called on objet with property table_element not defined", LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
$this->db->begin();
|
||||
|
||||
if ($shipping_method_id<0) $shipping_method_id='NULL';
|
||||
dol_syslog(get_class($this).'::setShippingMethod('.$shipping_method_id.')');
|
||||
@ -2112,30 +2112,30 @@ abstract class CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql.= " SET fk_shipping_method = ".$shipping_method_id;
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
$resql = $this->db->query($sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) {
|
||||
dol_syslog(get_class($this).'::setShippingMethod Error ', LOG_DEBUG);
|
||||
$this->error = $this->db->lasterror();
|
||||
$error++;
|
||||
} else {
|
||||
if (!$notrigger)
|
||||
{
|
||||
// Call trigger
|
||||
$this->context=array('shippingmethodupdate'=>1);
|
||||
$result = $this->call_trigger(strtoupper(get_class($this)) . '_MODIFY', $userused);
|
||||
if ($result < 0) $error++;
|
||||
// End call trigger
|
||||
}
|
||||
}
|
||||
if ($error)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
} else {
|
||||
$this->shipping_method_id = ($shipping_method_id=='NULL')?null:$shipping_method_id;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
if (!$notrigger)
|
||||
{
|
||||
// Call trigger
|
||||
$this->context=array('shippingmethodupdate'=>1);
|
||||
$result = $this->call_trigger(strtoupper(get_class($this)) . '_MODIFY', $userused);
|
||||
if ($result < 0) $error++;
|
||||
// End call trigger
|
||||
}
|
||||
}
|
||||
if ($error)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
} else {
|
||||
$this->shipping_method_id = ($shipping_method_id=='NULL')?null:$shipping_method_id;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2217,17 +2217,17 @@ abstract class CommonObject
|
||||
*/
|
||||
public function setBankAccount($fk_account, $notrigger = false, $userused = null)
|
||||
{
|
||||
global $user;
|
||||
global $user;
|
||||
|
||||
if (empty($userused)) $userused=$user;
|
||||
if (empty($userused)) $userused=$user;
|
||||
|
||||
$error = 0;
|
||||
$error = 0;
|
||||
|
||||
if (! $this->table_element) {
|
||||
dol_syslog(get_class($this)."::setBankAccount was called on objet with property table_element not defined", LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
$this->db->begin();
|
||||
$this->db->begin();
|
||||
|
||||
if ($fk_account<0) $fk_account='NULL';
|
||||
dol_syslog(get_class($this).'::setBankAccount('.$fk_account.')');
|
||||
@ -2236,36 +2236,36 @@ abstract class CommonObject
|
||||
$sql.= " SET fk_account = ".$fk_account;
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
dol_syslog(get_class($this).'::setBankAccount Error '.$sql.' - '.$this->db->error());
|
||||
$this->error = $this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$notrigger)
|
||||
{
|
||||
// Call trigger
|
||||
$this->context=array('bankaccountupdate'=>1);
|
||||
$result = $this->call_trigger(strtoupper(get_class($this)) . '_MODIFY', $userused);
|
||||
if ($result < 0) $error++;
|
||||
// End call trigger
|
||||
}
|
||||
}
|
||||
if ($error)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->fk_account = ($fk_account=='NULL')?null:$fk_account;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
dol_syslog(get_class($this).'::setBankAccount Error '.$sql.' - '.$this->db->error());
|
||||
$this->error = $this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$notrigger)
|
||||
{
|
||||
// Call trigger
|
||||
$this->context=array('bankaccountupdate'=>1);
|
||||
$result = $this->call_trigger(strtoupper(get_class($this)) . '_MODIFY', $userused);
|
||||
if ($result < 0) $error++;
|
||||
// End call trigger
|
||||
}
|
||||
}
|
||||
if ($error)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->fk_account = ($fk_account=='NULL')?null:$fk_account;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO: Move line related operations to CommonObjectLine?
|
||||
@ -2967,7 +2967,7 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Add objects linked in llx_element_element.
|
||||
*
|
||||
@ -2978,7 +2978,7 @@ abstract class CommonObject
|
||||
*/
|
||||
public function add_object_linked($origin = null, $origin_id = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
// phpcs:enable
|
||||
$origin = (! empty($origin) ? $origin : $this->origin);
|
||||
$origin_id = (! empty($origin_id) ? $origin_id : $this->origin_id);
|
||||
|
||||
@ -2986,7 +2986,7 @@ abstract class CommonObject
|
||||
if ($origin == 'order') $origin='commande';
|
||||
if ($origin == 'invoice') $origin='facture';
|
||||
if ($origin == 'invoice_template') $origin='facturerec';
|
||||
if ($origin == 'supplierorder') $origin='order_supplier';
|
||||
if ($origin == 'supplierorder') $origin='order_supplier';
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element (";
|
||||
@ -3003,16 +3003,16 @@ abstract class CommonObject
|
||||
|
||||
dol_syslog(get_class($this)."::add_object_linked", LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
return 0;
|
||||
}
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3649,10 +3649,11 @@ abstract class CommonObject
|
||||
{
|
||||
if (empty($totalToShip)) $totalToShip=0; // Avoid warning because $totalToShip is ''
|
||||
$totalToShip+=$line->qty_shipped; // defined for shipment only
|
||||
}elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty))
|
||||
{
|
||||
if (empty($totalToShip)) $totalToShip=0;
|
||||
$totalToShip+=$line->qty; // defined for reception only
|
||||
}
|
||||
elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty))
|
||||
{
|
||||
if (empty($totalToShip)) $totalToShip=0;
|
||||
$totalToShip+=$line->qty; // defined for reception only
|
||||
}
|
||||
|
||||
// Define qty, weight, volume, weight_units, volume_units
|
||||
@ -4271,7 +4272,7 @@ abstract class CommonObject
|
||||
$productstatic->id = $line->fk_product;
|
||||
$productstatic->ref = $line->ref;
|
||||
$productstatic->type = $line->fk_product_type;
|
||||
if(empty($productstatic->ref)){
|
||||
if (empty($productstatic->ref)) {
|
||||
$line->fetch_product();
|
||||
$productstatic = $line->product;
|
||||
}
|
||||
@ -4637,14 +4638,14 @@ abstract class CommonObject
|
||||
if (! empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true;
|
||||
}
|
||||
if ($this->element == 'commande' && ! empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
$setsharekey=true;
|
||||
}
|
||||
$setsharekey=true;
|
||||
}
|
||||
if ($this->element == 'facture' && ! empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
$setsharekey=true;
|
||||
}
|
||||
$setsharekey=true;
|
||||
}
|
||||
if ($this->element == 'bank_account' && ! empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
$setsharekey=true;
|
||||
}
|
||||
$setsharekey=true;
|
||||
}
|
||||
|
||||
if ($setsharekey)
|
||||
{
|
||||
@ -4807,7 +4808,7 @@ abstract class CommonObject
|
||||
/* For triggers */
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Call trigger based on this instance.
|
||||
* Some context information may also be provided into array property this->context.
|
||||
@ -4818,9 +4819,9 @@ abstract class CommonObject
|
||||
* @param User $user Object user
|
||||
* @return int Result of run_triggers
|
||||
*/
|
||||
public function call_trigger($trigger_name, $user)
|
||||
public function call_trigger($trigger_name, $user)
|
||||
{
|
||||
// phpcs:enable
|
||||
// phpcs:enable
|
||||
global $langs,$conf;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
@ -4845,7 +4846,7 @@ abstract class CommonObject
|
||||
/* Functions for extrafields */
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to get extra fields of an object into $this->array_options
|
||||
* This method is in most cases called by method fetch of objects but you can call it separately.
|
||||
@ -4854,9 +4855,9 @@ abstract class CommonObject
|
||||
* @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label(). Deprecated. Function must be called without parameters.
|
||||
* @return int <0 if error, 0 if no values of extrafield to find nor found, 1 if an attribute is found and value loaded
|
||||
*/
|
||||
public function fetch_optionals($rowid = null, $optionsArray = null)
|
||||
public function fetch_optionals($rowid = null, $optionsArray = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
// phpcs:enable
|
||||
if (empty($rowid)) $rowid=$this->id;
|
||||
|
||||
// To avoid SQL errors. Probably not the better solution though
|
||||
@ -5484,7 +5485,7 @@ abstract class CommonObject
|
||||
elseif (in_array($type, array('int','integer','price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type))
|
||||
{
|
||||
$morecss = 'maxwidth75';
|
||||
} elseif ($type == 'url') {
|
||||
} elseif ($type == 'url') {
|
||||
$morecss='minwidth400';
|
||||
}
|
||||
elseif ($type == 'boolean')
|
||||
@ -7178,8 +7179,8 @@ abstract class CommonObject
|
||||
* @param array $fieldsentry Properties of field
|
||||
* @return string
|
||||
*/
|
||||
protected function quote($value, $fieldsentry)
|
||||
{
|
||||
protected function quote($value, $fieldsentry)
|
||||
{
|
||||
if (is_null($value)) return 'NULL';
|
||||
elseif (preg_match('/^(int|double|real)/i', $fieldsentry['type'])) return $this->db->escape("$value");
|
||||
else return "'".$this->db->escape($value)."'";
|
||||
|
||||
@ -177,7 +177,7 @@ class DolEditor
|
||||
$out.= $this->content;
|
||||
$out.= '</textarea>';
|
||||
|
||||
if ($this->tool == 'ckeditor' && ! empty($conf->use_javascript_ajax))
|
||||
if ($this->tool == 'ckeditor' && ! empty($conf->use_javascript_ajax) && ! empty($conf->fckeditor->enabled))
|
||||
{
|
||||
if (! defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR', '1');
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ class DolGraph
|
||||
public function __construct($library = 'jflot')
|
||||
{
|
||||
global $conf;
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor;
|
||||
|
||||
// To use old feature
|
||||
if ($library == 'artichow')
|
||||
@ -883,7 +883,6 @@ class DolGraph
|
||||
private function draw_jflot($file, $fileurl)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $artichow_defaultfont;
|
||||
|
||||
dol_syslog(get_class($this)."::draw_jflot this->type=".join(',', $this->type)." this->MaxValue=".$this->MaxValue);
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ class Form
|
||||
* @return string HTML edit field
|
||||
*/
|
||||
public function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id')
|
||||
{
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$ret='';
|
||||
@ -144,7 +144,7 @@ class Form
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output value of a field for an editable field
|
||||
@ -1901,7 +1901,7 @@ class Form
|
||||
// check parameters
|
||||
$price_level = (! empty($price_level) ? $price_level : 0);
|
||||
if (is_null($ajaxoptions)) $ajaxoptions=array();
|
||||
|
||||
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT))
|
||||
{
|
||||
$placeholder='';
|
||||
@ -7204,7 +7204,7 @@ class Form
|
||||
if ($object->photo) $ret.="<br>\n";
|
||||
$ret.='<table class="nobordernopadding centpercent">';
|
||||
if ($object->photo) $ret.='<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
|
||||
$ret.='<tr><td class="tdoverflow"><input type="file" class="flat maxwidth200onsmartphone" name="photo" id="photoinput"'.($capture?' capture="'.$capture.'"':'').'></td></tr>';
|
||||
$ret.='<tr><td class="tdoverflow"><input type="file" class="flat maxwidth200onsmartphone" name="photo" id="photoinput" accept="image/*"'.($capture?' capture="'.$capture.'"':'').'></td></tr>';
|
||||
$ret.='</table>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,9 +205,7 @@ class FormActions
|
||||
$newcardbutton='';
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(), 'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid>0?'&socid='.$object->socid:($socid>0?'&socid='.$socid:'')).($projectid>0?'&projectid='.$projectid:'').'&backtopage='.urlencode($urlbacktopage).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddEvent").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(), 'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid>0?'&socid='.$object->socid:($socid>0?'&socid='.$socid:'')).($projectid>0?'&projectid='.$projectid:'').'&backtopage='.urlencode($urlbacktopage));
|
||||
}
|
||||
|
||||
print '<!-- formactions->showactions -->'."\n";
|
||||
|
||||
@ -644,7 +644,7 @@ class FormFile
|
||||
else
|
||||
{
|
||||
$submodulepart = $modulepart;
|
||||
|
||||
|
||||
// For normalized standard modules
|
||||
$file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php', 0);
|
||||
if (file_exists($file))
|
||||
@ -869,7 +869,7 @@ class FormFile
|
||||
{
|
||||
$out.='<tr class="oddeven">';
|
||||
$out.='<td colspan="'.$colspan.'" class="maxwidhtonsmartphone">';
|
||||
$out.='<a data-ajax="false" href="' . $link->url . '" target="_blank">';
|
||||
$out.='<a data-ajax="false" href="' . $file->url . '" target="_blank">';
|
||||
$out.=$file->label;
|
||||
$out.='</a>';
|
||||
$out.='</td>';
|
||||
@ -1320,7 +1320,7 @@ class FormFile
|
||||
{
|
||||
// Delete or view link
|
||||
// ($param must start with &)
|
||||
print '<td class="valignmiddle right actionbuttons"><!-- action on files -->';
|
||||
print '<td class="valignmiddle right actionbuttons nowraponall"><!-- action on files -->';
|
||||
if ($useinecm == 1 || $useinecm == 5)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/ecm/file_card.php?urlfile='.urlencode($file['name']).$param.'" class="editfilelink" rel="'.urlencode($file['name']).'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
|
||||
|
||||
@ -96,7 +96,7 @@ class FormMargin
|
||||
$line->pa_ht = $line->subprice * (1 - ($line->remise_percent / 100));
|
||||
}
|
||||
|
||||
$pv = $line->qty * $line->subprice * (1 - $line->remise_percent / 100);
|
||||
$pv = $line->total_ht;
|
||||
$pa_ht = ($pv < 0 ? - $line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
|
||||
$pa = $line->qty * $pa_ht;
|
||||
|
||||
|
||||
@ -730,9 +730,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel
|
||||
$newcardbutton='';
|
||||
if (! empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink))
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage));
|
||||
}
|
||||
|
||||
print "\n";
|
||||
@ -934,9 +932,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
$addcontact = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress"));
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contact/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage).'"><span class="valignmiddle text-plus-circle">'.$addcontact.'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($addcontact, '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage));
|
||||
}
|
||||
|
||||
print "\n";
|
||||
|
||||
@ -1557,7 +1557,13 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess
|
||||
$info = pathinfo($destfull);
|
||||
$destfull = $info['dirname'].'/'.dol_sanitizeFileName($info['filename'].($info['extension']!='' ? ('.'.strtolower($info['extension'])) : ''));
|
||||
$info = pathinfo($destfile);
|
||||
|
||||
$destfile = dol_sanitizeFileName($info['filename'].($info['extension']!='' ? ('.'.strtolower($info['extension'])) : ''));
|
||||
// We apply dol_string_nohtmltag also to clean file names (this remove duplicate spaces) because
|
||||
// this function is also applied when we make try to download file (by the GETPOST(filename, 'alphanohtml') call).
|
||||
$destfile = dol_string_nohtmltag($destfile);
|
||||
$destfull = dol_string_nohtmltag($destfull);
|
||||
|
||||
$resupload = dol_move_uploaded_file($TFile['tmp_name'][$i], $destfull, $allowoverwrite, 0, $TFile['error'][$i], 0, $varfiles);
|
||||
|
||||
if (is_numeric($resupload) && $resupload > 0) // $resupload can be 'ErrorFileAlreadyExists'
|
||||
|
||||
@ -660,16 +660,19 @@ function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0)
|
||||
if (empty($type)) // For a filesystem path
|
||||
{
|
||||
$res = DOL_DOCUMENT_ROOT.'/'.$path; // Standard default path
|
||||
foreach ($conf->file->dol_document_root as $key => $dirroot) // ex: array(["main"]=>"/home/main/htdocs", ["alt0"]=>"/home/dirmod/htdocs", ...)
|
||||
if (is_array($conf->file->dol_document_root))
|
||||
{
|
||||
if ($key == 'main')
|
||||
foreach ($conf->file->dol_document_root as $key => $dirroot) // ex: array("main"=>"/home/main/htdocs", "alt0"=>"/home/dirmod/htdocs", ...)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (file_exists($dirroot.'/'.$path))
|
||||
{
|
||||
$res=$dirroot.'/'.$path;
|
||||
return $res;
|
||||
if ($key == 'main')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (file_exists($dirroot.'/'.$path))
|
||||
{
|
||||
$res=$dirroot.'/'.$path;
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($returnemptyifnotfound) // Not found into alternate dir
|
||||
@ -3593,12 +3596,12 @@ function img_allow($allow, $titlealt = 'default')
|
||||
*/
|
||||
function img_credit_card($brand)
|
||||
{
|
||||
if ($brand == 'Visa') {$brand='cc-visa';}
|
||||
elseif ($brand == 'MasterCard') {$brand='cc-mastercard';}
|
||||
elseif ($brand == 'American Express') {$brand='cc-amex';}
|
||||
elseif ($brand == 'Discover') {$brand='cc-discover';}
|
||||
elseif ($brand == 'JCB') {$brand='cc-jcb';}
|
||||
elseif ($brand == 'Diners Club') {$brand='cc-diners-club';}
|
||||
if ($brand == 'visa' || $brand == 'Visa') {$brand='cc-visa';}
|
||||
elseif ($brand == 'mastercard' || $brand == 'MasterCard') {$brand='cc-mastercard';}
|
||||
elseif ($brand == 'amex' || $brand == 'American Express') {$brand='cc-amex';}
|
||||
elseif ($brand == 'discover' || $brand == 'Discover') {$brand='cc-discover';}
|
||||
elseif ($brand == 'jcb' || $brand == 'JCB') {$brand='cc-jcb';}
|
||||
elseif ($brand == 'diners' || $brand == 'Diners club') {$brand='cc-diners-club';}
|
||||
elseif (! in_array($brand, array('cc-visa','cc-mastercard','cc-amex','cc-discover','cc-jcb','cc-diners-club'))) {$brand='credit-card';}
|
||||
|
||||
return '<span class="fa fa-'.$brand.' fa-2x fa-fw"></span>';
|
||||
@ -6582,7 +6585,7 @@ function dol_htmloutput_errors($mesgstring = '', $mesgarray = array(), $keepembe
|
||||
* or descending output and uses optionally natural case insensitive sorting (which
|
||||
* can be optionally case sensitive as well).
|
||||
*
|
||||
* @param array $array Array to sort (array of array('key','otherkey1','otherkey2'...))
|
||||
* @param array $array Array to sort (array of array('key1'=>val1,'key2'=>val2,'key3'...) or array of objects)
|
||||
* @param string $index Key in array to use for sorting criteria
|
||||
* @param int $order Sort order ('asc' or 'desc')
|
||||
* @param int $natsort 1=use "natural" sort (natsort), 0=use "standard" sort (asort)
|
||||
@ -6601,7 +6604,17 @@ function dol_sort_array(&$array, $index, $order = 'asc', $natsort = 0, $case_sen
|
||||
if ($sizearray>0)
|
||||
{
|
||||
$temp = array();
|
||||
foreach(array_keys($array) as $key) $temp[$key]=$array[$key][$index];
|
||||
foreach(array_keys($array) as $key)
|
||||
{
|
||||
if (is_object($array[$key]))
|
||||
{
|
||||
$temp[$key]=$array[$key]->$index;
|
||||
}
|
||||
else
|
||||
{
|
||||
$temp[$key]=$array[$key][$index];
|
||||
}
|
||||
}
|
||||
|
||||
if (! $natsort) {
|
||||
($order=='asc') ? asort($temp) : arsort($temp);
|
||||
@ -8004,6 +8017,8 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$return = '';
|
||||
|
||||
// image's filename are still in French
|
||||
$statusImg=array(
|
||||
'status0' => 'statut0'
|
||||
@ -8140,3 +8155,117 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
||||
|
||||
return '<div class="inline-block divButAction"><'.$tag.' '.$compiledAttributes.'>'.$html.'</'.$tag.'></div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function dolGetButtonTitle : this kind of buttons are used in title in list
|
||||
*
|
||||
* @param string $label label of button
|
||||
* @param string $helpText optional : content for help tooltip
|
||||
* @param string $iconClass class for icon element
|
||||
* @param string $url the url for link
|
||||
* @param string $id attribute id of button
|
||||
* @param int $status 0 no user rights, 1 active, -1 Feature Disabled, -2 disable Other reason use helpText as tooltip
|
||||
* @param array $params various params for future : recommended rather than adding more function arguments
|
||||
* @return string html button
|
||||
*/
|
||||
function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $url = '', $id = '', $status = 1, $params = array())
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
// Actually this conf is used in css too for external module compatibility and smooth transition to this function
|
||||
if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (! $user->admin) && $status <= 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$class = 'btnTitle' ;
|
||||
|
||||
// hidden conf keep during button transition TODO: remove this block
|
||||
if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){
|
||||
$class = 'butActionNew';
|
||||
}
|
||||
|
||||
$attr=array(
|
||||
'class' => $class
|
||||
,'href' => empty($url)?'':$url
|
||||
);
|
||||
|
||||
if(!empty($helpText)){
|
||||
$attr['title'] = dol_escape_htmltag($helpText);
|
||||
}
|
||||
|
||||
if($status <= 0){
|
||||
$attr['class'] .= ' refused';
|
||||
|
||||
// hidden conf keep during button transition TODO: remove this block
|
||||
if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){
|
||||
$attr['class'] = 'butActionNewRefused';
|
||||
}
|
||||
|
||||
$attr['href'] = '';
|
||||
|
||||
if($status == -1){ // Not enough permissions
|
||||
$attr['title'] = dol_escape_htmltag($langs->transnoentitiesnoconv("FeatureDisabled"));
|
||||
}
|
||||
elseif($status == 0){ // disable
|
||||
$attr['title'] = dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions"));
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($attr['title'])){
|
||||
$attr['class'] .= ' classfortooltip';
|
||||
}
|
||||
|
||||
if(empty($id)){
|
||||
$attr['id'] = $id;
|
||||
}
|
||||
|
||||
// Override attr
|
||||
if(!empty($params['attr']) && is_array($params['attr'])){
|
||||
foreach($params['attr'] as $key => $value){
|
||||
if($key == 'class'){
|
||||
$attr['class'].= ' '.$value;
|
||||
}
|
||||
elseif($key == 'classOverride'){
|
||||
$attr['class'] = $value;
|
||||
}
|
||||
else{
|
||||
$attr[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($attr['href']) && empty($attr['href'])){
|
||||
unset($attr['href']);
|
||||
}
|
||||
|
||||
// TODO : add a hook
|
||||
|
||||
// escape all attribute
|
||||
$attr = array_map('dol_escape_htmltag', $attr);
|
||||
|
||||
$TCompiledAttr = array();
|
||||
foreach($attr as $key => $value){
|
||||
$TCompiledAttr[] = $key.'="'.$value.'"';
|
||||
}
|
||||
|
||||
$compiledAttributes = !empty($TCompiledAttr)?implode(' ', $TCompiledAttr):'';
|
||||
|
||||
$tag = !empty($attr['href'])?'a':'span';
|
||||
|
||||
|
||||
$button ='<'.$tag.' '.$compiledAttributes.' >';
|
||||
$button.= '<span class="'.$iconClass.' valignmiddle btnTitle-icon"></span>';
|
||||
$button.= '<span class="valignmiddle text-plus-circle btnTitle-label">'.$label.'</span>';
|
||||
$button.= '</'.$tag.'>';
|
||||
|
||||
// hidden conf keep during button transition TODO: remove this block
|
||||
if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){
|
||||
$button='<'.$tag.' '.$compiledAttributes.' ><span class="text-plus-circle">'.$label.'</span>';
|
||||
$button.= '<span class="'.$iconClass.' valignmiddle"></span>';
|
||||
$button.= '</'.$tag.'>';
|
||||
}
|
||||
|
||||
return $button;
|
||||
}
|
||||
|
||||
@ -1374,6 +1374,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
||||
if (! empty($object->lines[$i]->date_start) || ! empty($object->lines[$i]->date_end))
|
||||
{
|
||||
$format='day';
|
||||
$period = '';
|
||||
// Show duration if exists
|
||||
if ($object->lines[$i]->date_start && $object->lines[$i]->date_end)
|
||||
{
|
||||
|
||||
@ -145,8 +145,8 @@ function user_prepare_head($object)
|
||||
|
||||
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||
|| (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read))
|
||||
|| (! empty($conf->expensereport->enabled) && ! empty($user->rights->expensereport->lire) && $user->id == $object->id)
|
||||
|| (! empty($conf->holiday->enabled) && ! empty($user->rights->holiday->read) && $user->id == $object->id )
|
||||
|| (! empty($conf->expensereport->enabled) && ! empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall))
|
||||
|| (! empty($conf->holiday->enabled) && ! empty($user->rights->holiday->read) && ($user->id == $object->id || $user->rights->holiday->read_all))
|
||||
)
|
||||
{
|
||||
// Bank
|
||||
|
||||
@ -142,12 +142,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
|
||||
// Products-Services
|
||||
$tmpentry = array(
|
||||
'enabled'=> (( ! empty($conf->societe->enabled) &&
|
||||
( empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) )
|
||||
)
|
||||
|| ! empty($conf->fournisseur->enabled)
|
||||
),
|
||||
'perms'=> (! empty($user->rights->societe->lire) || ! empty($user->rights->fournisseur->lire)),
|
||||
'enabled'=> (! empty($conf->product->enabled) || ! empty($conf->service->enabled)),
|
||||
'perms'=> (! empty($user->rights->produit->lire) || ! empty($user->rights->service->lire)),
|
||||
'module'=>'product|service'
|
||||
);
|
||||
$menu_arr[] = array(
|
||||
|
||||
@ -667,7 +667,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
array(
|
||||
'doc/' => dol_buildpath(strtolower($this->name).'/doc/', 1),
|
||||
'img/' => dol_buildpath(strtolower($this->name).'/img/', 1),
|
||||
'images/' => dol_buildpath(strtolower($this->name).'/imgages/', 1),
|
||||
'images/' => dol_buildpath(strtolower($this->name).'/images/', 1),
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -746,7 +746,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
$filefound= false;
|
||||
|
||||
// Define path to file README.md.
|
||||
// First check README-la_LA.md then README.md
|
||||
// First check ChangeLog-la_LA.md then ChangeLog.md
|
||||
$pathoffile = dol_buildpath(strtolower($this->name).'/ChangeLog-'.$langs->defaultlang.'.md', 0);
|
||||
if (dol_is_file($pathoffile)) {
|
||||
$filefound = true;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
/* Copyright (C) 2011-2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -72,7 +72,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
$texte.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$texte.= '<input type="hidden" name="action" value="updateMask">';
|
||||
$texte.= '<input type="hidden" name="maskconstcontract" value="HOLIDAY_IMMACULATE_MASK">';
|
||||
$texte.= '<input type="hidden" name="maskconstholiday" value="HOLIDAY_IMMACULATE_MASK">';
|
||||
$texte.= '<table class="nobordernopadding" width="100%">';
|
||||
|
||||
$tooltip=$langs->trans("GenericMaskCodes", $langs->transnoentities("Holiday"), $langs->transnoentities("Holiday"));
|
||||
|
||||
@ -243,11 +243,12 @@ class modAccounting extends DolibarrModules
|
||||
$this->export_icon[$r]='Accounting';
|
||||
$this->export_permission[$r]=array(array("accounting","chartofaccount"));
|
||||
$this->export_fields_array[$r]=array('ac.rowid'=>'ChartofaccountsId','ac.pcg_version'=>'Chartofaccounts','aa.rowid'=>'Id','aa.account_number'=>"AccountAccounting",'aa.label'=>"Label",'aa.account_parent'=>"Accountparent",'aa.pcg_type'=>"Pcgtype",'aa.pcg_subtype'=>'Pcgsubtype','aa.active'=>'Status');
|
||||
$this->export_TypeFields_array[$r]=array('ac.rowid'=>'List:accounting_system:pcg_version','aa.account_number'=>"Text",'aa.label'=>"Text",'aa.pcg_type'=>'Text','aa.pcg_subtype'=>'Text','aa.active'=>'Status');
|
||||
$this->export_TypeFields_array[$r]=array('ac.rowid'=>'List:accounting_system:pcg_version','aa.account_number'=>"Text",'aa.label'=>"Text",'aa.account_parent'=>"Text",'aa.pcg_type'=>'Text','aa.pcg_subtype'=>'Text','aa.active'=>'Status');
|
||||
$this->export_entities_array[$r]=array('ac.rowid'=>"Accounting",'ac.pcg_version'=>"Accounting",'aa.rowid'=>'Accounting','aa.account_number'=>"Accounting",'aa.label'=>"Accounting",'aa.accountparent'=>"Accounting",'aa.pcg_type'=>"Accounting",'aa.pcgsubtype'=>"Accounting",'aa_active'=>"Accounting");
|
||||
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'accounting_account as aa, '.MAIN_DB_PREFIX.'accounting_system as ac';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'accounting_account as aa';
|
||||
$this->export_sql_end[$r] .=' ,'.MAIN_DB_PREFIX.'accounting_system as ac';
|
||||
$this->export_sql_end[$r] .=' WHERE ac.pcg_version = aa.fk_pcg_version AND aa.entity IN ('.getEntity('accounting').') ';
|
||||
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ class modCron extends DolibarrModules
|
||||
$this->menu[$r] = array('fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'CronList',
|
||||
'url'=>'/cron/list.php?status=-2&leftmenu=admintools',
|
||||
'url'=>'/cron/list.php?leftmenu=admintools',
|
||||
'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>200,
|
||||
'enabled'=>'$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
|
||||
@ -169,6 +169,7 @@ class modProduct extends DolibarrModules
|
||||
$this->export_permission[$r]=array(array("produit","export"));
|
||||
$this->export_fields_array[$r]=array(
|
||||
'p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.url'=>"PublicUrl",'p.accountancy_code_sell'=>"ProductAccountancySellCode",
|
||||
'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode",
|
||||
'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.width'=>"Width",'p.height'=>"Height",'p.surface'=>"Surface",
|
||||
'p.volume'=>"Volume",'p.weight'=>"Weight",'p.customcode'=>'CustomCode','p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",
|
||||
'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification'
|
||||
@ -184,7 +185,8 @@ class modProduct extends DolibarrModules
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel','l.description'=>'TranslatedDescription','l.note'=>'TranslatedNote'));
|
||||
if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit';
|
||||
$this->export_TypeFields_array[$r]=array(
|
||||
'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",
|
||||
'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",
|
||||
'p.accountancy_code_sell_intra'=>"Text",'p.accountancy_code_sell_export'=>"Text",'p.accountancy_code_buy'=>"Text",
|
||||
'p.note'=>"Text",'p.length'=>"Numeric",'p.width'=>"Numeric",'p.height'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",
|
||||
'p.customcode'=>'Text','p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",
|
||||
'p.tobuy'=>"Boolean",'p.datec'=>'Date','p.tms'=>'Date'
|
||||
@ -289,7 +291,8 @@ class modProduct extends DolibarrModules
|
||||
$this->export_permission[$r]=array(array("produit","export"));
|
||||
$this->export_fields_array[$r]=array(
|
||||
'p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.url'=>"PublicUrl",
|
||||
'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",
|
||||
'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
|
||||
'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",
|
||||
'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.customcode'=>'CustomCode',
|
||||
'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",
|
||||
'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification'
|
||||
@ -298,7 +301,8 @@ class modProduct extends DolibarrModules
|
||||
if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode'));
|
||||
$this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty','pa.incdec'=>'ComposedProductIncDecStock'));
|
||||
$this->export_TypeFields_array[$r]=array(
|
||||
'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",
|
||||
'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",
|
||||
'p.accountancy_code_sell_intra'=>"Text",'p.accountancy_code_sell_export'=>"Text",'p.accountancy_code_buy'=>"Text",
|
||||
'p.note'=>"Text",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",'p.customcode'=>'Text',
|
||||
'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",
|
||||
'p.datec'=>'Date','p.tms'=>'Date'
|
||||
@ -308,7 +312,8 @@ class modProduct extends DolibarrModules
|
||||
$this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric'));
|
||||
$this->export_entities_array[$r]=array(
|
||||
'p.rowid'=>"virtualproduct",'p.ref'=>"virtualproduct",'p.label'=>"virtualproduct",'p.description'=>"virtualproduct",'p.url'=>"virtualproduct",
|
||||
'p.accountancy_code_sell'=>'virtualproduct','p.accountancy_code_buy'=>'virtualproduct','p.note'=>"virtualproduct",'p.length'=>"virtualproduct",
|
||||
'p.accountancy_code_sell'=>'virtualproduct','p.accountancy_code_sell_intra'=>'virtualproduct','p.accountancy_code_sell_export'=>'virtualproduct',
|
||||
'p.accountancy_code_buy'=>'virtualproduct','p.note'=>"virtualproduct",'p.length'=>"virtualproduct",
|
||||
'p.surface'=>"virtualproduct",'p.volume'=>"virtualproduct",'p.weight'=>"virtualproduct",'p.customcode'=>'virtualproduct',
|
||||
'p.price_base_type'=>"virtualproduct",'p.price'=>"virtualproduct",'p.price_ttc'=>"virtualproduct",'p.tva_tx'=>"virtualproduct",
|
||||
'p.tosell'=>"virtualproduct",'p.tobuy'=>"virtualproduct",'p.datec'=>"virtualproduct",'p.tms'=>"virtualproduct"
|
||||
@ -492,6 +497,8 @@ class modProduct extends DolibarrModules
|
||||
'p.duration' => "eg. 365d/12m/1y",
|
||||
'p.url' => 'link to product (no https)',
|
||||
'p.accountancy_code_sell' => "",
|
||||
'p.accountancy_code_sell_intra' => "",
|
||||
'p.accountancy_code_sell_export' => "",
|
||||
'p.accountancy_code_buy' => "",
|
||||
'p.weight' => "",
|
||||
'p.weight_units' => 'use a unit of measure from the dictionary. g/Kg/T etc....matches field "Short Label" for unit type "weight" in table "' . MAIN_DB_PREFIX . 'c_units',
|
||||
|
||||
@ -65,7 +65,7 @@ class modTakePos extends DolibarrModules
|
||||
$this->descriptionlong = "Point Of Sales (compliant with touch screen)";
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
|
||||
$this->version = 'experimental';
|
||||
$this->version = 'dolibarr';
|
||||
// Key used in llx_const table to save module status enabled/disabled (where TAKEPOS is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Name of image file used for this module.
|
||||
|
||||
@ -68,7 +68,7 @@ class modWorkflow extends DolibarrModules
|
||||
$this->config_page_url = array('workflow.php');
|
||||
|
||||
// Dependencies
|
||||
$this->hidden = false; // A condition to hide module
|
||||
$this->hidden = false; // A condition to hide module
|
||||
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
@ -77,10 +77,21 @@ class modWorkflow extends DolibarrModules
|
||||
$this->langfiles = array("@workflow");
|
||||
|
||||
// Constants
|
||||
// List of particular constants to add when module is enabled
|
||||
//Example: $this->const=array(0=>array('MODULE_MY_NEW_CONST1','chaine','myvalue','This is a constant to add',0),
|
||||
// 1=>array('MODULE_MY_NEW_CONST2','chaine','myvalue','This is another constant to add',0) );
|
||||
$this->const=array();
|
||||
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||
// Example: $this->const=array(1 => array('MYMODULE_MYNEWCONST1', 'chaine', 'myvalue', 'This is a constant to add', 1),
|
||||
// 2 => array('MYMODULE_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1)
|
||||
// );
|
||||
$this->const=array(
|
||||
//0=>array('WORKFLOW_PROPAL_AUTOCREATE_ORDER', 'chaine', '1', 'WORKFLOW_PROPAL_AUTOCREATE_ORDER', 0, 'current', 0),
|
||||
//0=>array('WORKFLOW_ORDER_AUTOCREATE_INVOICE', 'chaine', '1', 'WORKFLOW_ORDER_AUTOCREATE_INVOICE', 0, 'current', 0),
|
||||
0=>array('WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL', 'chaine', '1', 'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL', 0, 'current', 0),
|
||||
1=>array('WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL', 'chaine', '1', 'WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL', 0, 'current', 0),
|
||||
2=>array('WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING', 'chaine', '1', 'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING', 0, 'current', 0),
|
||||
4=>array('WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER', 'chaine', '1', 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER', 0, 'current', 0),
|
||||
5=>array('WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL', 'chaine', '1', 'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL', 0, 'current', 0),
|
||||
6=>array('WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER', 'chaine', '1', 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER', 0, 'current', 0),
|
||||
7=>array('WORKFLOW_BILL_ON_RECEPTION', 'chaine', '1', 'WORKFLOW_BILL_ON_RECEPTION', 0, 'current', 0)
|
||||
);
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
@ -301,7 +301,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
'table'=>'commande',
|
||||
'datefieldname'=>'date_commande',
|
||||
'test'=>$conf->commande->enabled && $user->rights->commande->lire,
|
||||
'lang'=>'order'),
|
||||
'lang'=>'orders'),
|
||||
'invoice'=>array(
|
||||
'name'=>"CustomersInvoices",
|
||||
'title'=>"ListInvoicesAssociatedProject",
|
||||
|
||||
@ -1810,7 +1810,6 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
global $hookmanager;
|
||||
|
||||
$parameters=array(
|
||||
'object' => $object,
|
||||
'curY' =>& $curY,
|
||||
'columnText' => $columnText,
|
||||
'colKey' => $colKey
|
||||
|
||||
@ -70,7 +70,7 @@ $colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normal
|
||||
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
||||
?>
|
||||
<body class="body bodylogin" style="background-image: url('<?php echo $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND; ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
|
||||
<body class="body bodylogin" style="background-image: url('<?php echo dol_escape_htmltag($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND); ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
||||
@ -783,6 +783,35 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
||||
|
||||
$object->sendtoid=0;
|
||||
}
|
||||
elseif($action == 'TICKET_ASSIGNED')
|
||||
{
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("agenda","other","projects"));
|
||||
|
||||
if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("TICKET_ASSIGNEDInDolibarr", $object->ref);
|
||||
$object->actionmsg=$langs->transnoentities("TICKET_ASSIGNEDInDolibarr", $object->ref);
|
||||
if ($object->oldcopy->fk_user_assign > 0)
|
||||
{
|
||||
$tmpuser=new User($this->db);
|
||||
$tmpuser->fetch($object->oldcopy->fk_user_assign);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("OldUser").': '.$tmpuser->getFullName($langs);
|
||||
}
|
||||
else
|
||||
{
|
||||
$object->actionmsg.="\n".$langs->transnoentities("OldUser").': '.$langs->trans("None");
|
||||
}
|
||||
if ($object->fk_user_assign > 0)
|
||||
{
|
||||
$tmpuser=new User($this->db);
|
||||
$tmpuser->fetch($object->fk_user_assign);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("NewUser").': '.$tmpuser->getFullName($langs);
|
||||
}
|
||||
else
|
||||
{
|
||||
$object->actionmsg.="\n".$langs->transnoentities("NewUser").': '.$langs->trans("None");
|
||||
}
|
||||
$object->sendtoid=0;
|
||||
}
|
||||
// TODO Merge all previous cases into this generic one
|
||||
else // $action = TICKET_CREATE, TICKET_MODIFY, TICKET_DELETE, ...
|
||||
{
|
||||
|
||||
@ -121,6 +121,8 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
$res = $userstat->fetch($object->fk_user_assign);
|
||||
if ($res > 0)
|
||||
{
|
||||
// Send email to notification email
|
||||
|
||||
if (empty($conf->global->TICKET_DISABLE_ALL_MAILS))
|
||||
{
|
||||
// Init to avoid errors
|
||||
|
||||
@ -75,7 +75,7 @@ if (!empty($cancel))
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-2');
|
||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -93,7 +93,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->del
|
||||
}
|
||||
else
|
||||
{
|
||||
Header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-2');
|
||||
Header("Location: ".DOL_URL_ROOT.'/cron/list.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -557,7 +557,7 @@ else
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans("CronTask"), -1, 'cron');
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2&restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
@ -50,7 +50,7 @@ $head = cron_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'info', $langs->trans("CronTask"), -1, 'cron');
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2&restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -56,7 +56,6 @@ if (! $sortfield) $sortfield='t.status,t.priority';
|
||||
if (! $sortorder) $sortorder='DESC,ASC';
|
||||
|
||||
$search_status=GETPOST('search_status', 'int')?GETPOST('search_status', 'int'):GETPOST('status', 'int');
|
||||
if ($search_status == '') $search_status=-2;
|
||||
|
||||
//Search criteria
|
||||
$search_label=GETPOST("search_label", 'alpha');
|
||||
@ -253,7 +252,6 @@ $sql.= " t.test";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."cronjob as t";
|
||||
$sql.= " WHERE entity IN (0,".$conf->entity.")";
|
||||
if ($search_status >= 0 && $search_status < 2) $sql.= " AND t.status = ".(empty($search_status)?'0':'1');
|
||||
if ($search_status == 2) $sql.= " AND t.status = 2";
|
||||
//Manage filter
|
||||
if (is_array($filter) && count($filter)>0) {
|
||||
foreach($filter as $key => $value) {
|
||||
@ -299,11 +297,11 @@ $num = $db->num_rows($result);
|
||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||
|
||||
$param = '';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_status) $param.='&search_status='.$search_status;
|
||||
if ($search_label) $param.='&search_label='.$search_label;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
if ($search_status) $param.='&search_status='.urlencode($search_status);
|
||||
if ($search_label) $param.='&search_label='.urlencode($search_label);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
@ -344,18 +342,8 @@ print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
|
||||
// Line with explanation and button new job
|
||||
$newcardbutton='';
|
||||
if ($user->rights->cron->create)
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" style="margin-right: 0px;margin-left: 0px;" href="'.DOL_URL_ROOT.'/cron/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("CronCreateJob").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNewRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("CronCreateJob").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('New'), $langs->trans('CronCreateJob'), 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter, '', $user->rights->cron->create);
|
||||
|
||||
|
||||
print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_setup', 0, $newcardbutton, '', $limit);
|
||||
|
||||
@ -393,7 +381,7 @@ print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Enabled"), '-2'=>$langs->trans("EnabledAndDisabled"), '2'=>$langs->trans("Archived")), $search_status, 1);
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Enabled")), $search_status, 1);
|
||||
print '</td><td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
|
||||
@ -33,7 +33,7 @@ class DolibarrDebugBar extends DebugBar
|
||||
//$this->addCollector(new PhpInfoCollector());
|
||||
//$this->addCollector(new DolMessagesCollector());
|
||||
$this->addCollector(new DolRequestDataCollector());
|
||||
$this->addCollector(new DolConfigCollector());
|
||||
//$this->addCollector(new DolConfigCollector()); // Disabled for security purpose
|
||||
$this->addCollector(new DolTimeDataCollector());
|
||||
$this->addCollector(new DolMemoryCollector());
|
||||
//$this->addCollector(new DolExceptionsCollector());
|
||||
|
||||
@ -142,9 +142,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->don->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/don/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewDonation').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create');
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
@ -280,10 +280,8 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->expedition->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/expedition/card.php?action=create2"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewSending').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2');
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -69,7 +70,7 @@ if (!$sortfield) $sortfield="d.date_debut";
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
||||
$search_ref = GETPOST('search_ref');
|
||||
$search_ref = GETPOST('search_ref', 'alpha');
|
||||
$search_user = GETPOST('search_user', 'int');
|
||||
$search_amount_ht = GETPOST('search_amount_ht', 'alpha');
|
||||
$search_amount_vat = GETPOST('search_amount_vat', 'alpha');
|
||||
@ -340,9 +341,9 @@ if ($resql)
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
if ($user->rights->expensereport->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
@ -455,9 +456,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->expensereport->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewTrip').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expensereport/card.php?action=create');
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
@ -50,14 +50,7 @@ print '<br>';
|
||||
print '<div class="center">';
|
||||
if (count($export->array_export_code))
|
||||
{
|
||||
if ($user->rights->export->creer)
|
||||
{
|
||||
print '<a class="butActionNew" href="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewExport").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionNewRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewExport").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
print dolGetButtonTitle($langs->trans('NewExport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/exports/export.php?leftmenu=export', '', $user->rights->export->creer);
|
||||
}
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
@ -305,21 +305,16 @@ if ($resql)
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
if ($user->rights->ficheinter->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->ficheinter->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fichinter/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewIntervention').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$morehtmlcenter.= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fichinter/card.php?action=create', '', $user->rights->ficheinter->creer);
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE', 'Dolibarr');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION', '10.0.0-alpha'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION', '10.0.0-beta'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||
|
||||
if (! defined('EURO')) define('EURO', chr(128));
|
||||
|
||||
|
||||
@ -1474,8 +1474,6 @@ class FactureFournisseur extends CommonInvoice
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Set draft status
|
||||
*
|
||||
@ -1492,11 +1490,11 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
dol_syslog(get_class($this)."::set_draft already draft status", LOG_WARNING);
|
||||
dol_syslog(__METHOD__." already draft status", LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
@ -620,9 +620,9 @@ if ($resql)
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
//if($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||
if ($user->rights->fournisseur->commande->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
@ -632,10 +632,8 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if($user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/commande/card.php?action=create');
|
||||
}
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -454,9 +454,9 @@ if ($resql)
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'validate'=>$langs->trans("Validate"),
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
//if($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||
if ($user->rights->fournisseur->facture->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
@ -466,9 +466,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewBill').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/facture/card.php?action=create');
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
|
||||
@ -251,21 +251,32 @@ if (empty($reshook))
|
||||
$datepaye = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||
|
||||
// Clean parameters amount if payment is for a credit note
|
||||
if (GETPOST('type', 'int') == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
foreach ($amounts as $key => $value) // How payment is dispatched
|
||||
{
|
||||
foreach ($amounts as $key => $value) // How payment is dispatch
|
||||
$tmpinvoice = new FactureFournisseur($db);
|
||||
$tmpinvoice->fetch($key);
|
||||
if ($tmpinvoice->type == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
$newvalue = price2num($value, 'MT');
|
||||
$amounts[$key] = -$newvalue;
|
||||
}
|
||||
|
||||
foreach ($multicurrency_amounts as $key => $value) // How payment is dispatch
|
||||
{
|
||||
$newvalue = price2num($value, 'MT');
|
||||
$multicurrency_amounts[$key] = -$newvalue;
|
||||
$amounts[$key] = - abs($newvalue);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($multicurrency_amounts as $key => $value) // How payment is dispatched
|
||||
{
|
||||
$tmpinvoice = new FactureFournisseur($db);
|
||||
$tmpinvoice->fetch($key);
|
||||
if ($tmpinvoice->type == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
$newvalue = price2num($value, 'MT');
|
||||
$multicurrency_amounts[$key] = - abs($newvalue);
|
||||
}
|
||||
}
|
||||
|
||||
//var_dump($amounts);
|
||||
//var_dump($multicurrency_amounts);
|
||||
//exit;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->begin();
|
||||
@ -491,26 +502,35 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
if (empty($reshook))
|
||||
{
|
||||
/*
|
||||
* Autres factures impayees
|
||||
* All unpayed supplier invoices
|
||||
*/
|
||||
$sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.multicurrency_total_ttc, f.datef as df,';
|
||||
$sql.= ' SUM(pf.amount) as am, SUM(pf.multicurrency_amount) as multicurrency_am, f.date_lim_reglement as dlr';
|
||||
$sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ht, f.total_ttc, f.multicurrency_total_ttc, f.datef as df, f.date_lim_reglement as dlr,';
|
||||
$sql.= ' SUM(pf.amount) as am, SUM(pf.multicurrency_amount) as multicurrency_am';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
$sql.= ' AND f.fk_soc = '.$object->socid;
|
||||
$sql.= ' AND f.paye = 0';
|
||||
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee
|
||||
$sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.multicurrency_total_ttc, f.datef, f.date_lim_reglement';
|
||||
if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
$sql .= ' AND f.type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql .= ' AND f.type = 2'; // If paying back a credit note, we show all credit notes
|
||||
}
|
||||
// Group by because we have a total
|
||||
$sql.= ' GROUP BY f.datef, f.ref, f.ref_supplier, f.rowid, f.type, f.total_ht, f.total_ttc, f.multicurrency_total_ttc, f.datef, f.date_lim_reglement';
|
||||
// Sort invoices by date and serial number: the older one comes first
|
||||
$sql.= ' ORDER BY f.datef ASC, f.ref ASC';
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num > 0)
|
||||
{
|
||||
$sign=1;
|
||||
if ($object->type == 2) $sign=-1;
|
||||
|
||||
$i = 0;
|
||||
print '<br>';
|
||||
|
||||
@ -551,8 +571,15 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$sign=1;
|
||||
if ($objp->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign=-1;
|
||||
|
||||
$invoice=new FactureFournisseur($db);
|
||||
$invoice->fetch($objp->facid);
|
||||
|
||||
$invoicesupplierstatic->ref=$objp->ref;
|
||||
$invoicesupplierstatic->id=$objp->facid;
|
||||
|
||||
$paiement = $invoice->getSommePaiement();
|
||||
$creditnotes=$invoice->getSumCreditNotesUsed();
|
||||
$deposits=$invoice->getSumDepositsUsed();
|
||||
@ -572,9 +599,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
print '<td>';
|
||||
$invoicesupplierstatic->ref=$objp->ref;
|
||||
$invoicesupplierstatic->id=$objp->facid;
|
||||
print '<td class="nowraponall">';
|
||||
print $invoicesupplierstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
@ -582,7 +607,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<td>'.$objp->ref_supplier.'</td>';
|
||||
|
||||
// Date
|
||||
if ($objp->df > 0 )
|
||||
if ($objp->df > 0)
|
||||
{
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->df), 'day').'</td>';
|
||||
@ -593,7 +618,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
|
||||
// Date Max Payment
|
||||
if ($objp->dlr > 0 )
|
||||
if ($objp->dlr > 0)
|
||||
{
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->dlr), 'day');
|
||||
@ -648,7 +673,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<td class="right">'.price($sign * $remaintopay).'</td>';
|
||||
|
||||
// Amount
|
||||
print '<td class="center">';
|
||||
print '<td class="center nowraponall">';
|
||||
|
||||
$namef = 'amount_'.$objp->facid;
|
||||
$nameRemain = 'remain_'.$objp->facid;
|
||||
@ -711,12 +736,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
print '<td class="right"><b>'.price($total_ttc).'</b></td>';
|
||||
print '<td class="right"><b>'.price($totalrecu);
|
||||
print '<td class="right"><b>'.price($sign * $total_ttc).'</b></td>';
|
||||
print '<td class="right"><b>'.price($sign * $totalrecu);
|
||||
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
||||
if ($totalrecudeposits) print '+'.price($totalrecudeposits);
|
||||
print '</b></td>';
|
||||
print '<td class="right"><b>'.price(price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
||||
print '<td class="right"><b>'.price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
||||
print '<td class="center" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
||||
print "</tr>\n";
|
||||
@ -936,11 +961,11 @@ if (empty($action) || $action == 'list')
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'p.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
|
||||
|
||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -955,29 +980,29 @@ if (empty($action) || $action == 'list')
|
||||
// Ref payment
|
||||
print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$objp->pid.'">'.img_object($langs->trans('ShowPayment'), 'payment').' '.$objp->pid.'</a></td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
|
||||
// Date
|
||||
$dateformatforpayment = 'day';
|
||||
if (! empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment='dayhour';
|
||||
print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->dp), $dateformatforpayment)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
|
||||
// Thirdparty
|
||||
print '<td>';
|
||||
if ($objp->socid) print '<a href="'.DOL_URL_ROOT.'/societe/card.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'), 'company').' '.dol_trunc($objp->name, 32).'</a>';
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
|
||||
// Type
|
||||
$payment_type = $langs->trans("PaymentType".$objp->paiement_type)!=("PaymentType".$objp->paiement_type)?$langs->trans("PaymentType".$objp->paiement_type):$objp->paiement_libelle;
|
||||
print '<td>'.$payment_type.' '.dol_trunc($objp->num_paiement, 32)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
|
||||
// Payment number
|
||||
print '<td>'.$objp->num_paiement.'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
|
||||
// Account
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
@ -987,13 +1012,13 @@ if (empty($action) || $action == 'list')
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
|
||||
// Amount
|
||||
print '<td class="right">'.price($objp->pamount).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
$totalarray['pos'][7]='amount';
|
||||
$totalarray['val']['amount'] += $objp->pamount;
|
||||
|
||||
|
||||
// Ref invoice
|
||||
/*$invoicesupplierstatic->ref=$objp->ref_supplier;
|
||||
$invoicesupplierstatic->id=$objp->facid;
|
||||
@ -1003,11 +1028,11 @@ if (empty($action) || $action == 'list')
|
||||
|
||||
print '<td></td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
// Show total line
|
||||
if (isset($totalarray['pos']))
|
||||
{
|
||||
@ -1029,7 +1054,7 @@ if (empty($action) || $action == 'list')
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
print "</table>";
|
||||
print "</div>";
|
||||
print "</form>\n";
|
||||
|
||||
@ -117,9 +117,9 @@ if ($fourn_id)
|
||||
|
||||
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>$langs->trans("Generate"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
|
||||
@ -340,10 +340,8 @@ else
|
||||
$newcardbutton='';
|
||||
if ($user->rights->holiday->write)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/holiday/card.php?action=request"><span class="valignmiddle text-plus-circle">'.$langs->trans('MenuAddCP').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$newcardbutton.= dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=request');
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ if (count($import->array_import_code))
|
||||
{
|
||||
//if ($user->rights->import->run)
|
||||
//{
|
||||
print '<a class="butActionNew" href="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewImport").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print dolGetButtonTitle($langs->trans('NewImport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/imports/import.php?leftmenu=import');
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
vendor/
|
||||
nbproject/
|
||||
/*.buildpath
|
||||
/*.project
|
||||
/.settings
|
||||
/error.log
|
||||
/export/nicejson
|
||||
.idea/
|
||||
*.iml
|
||||
/coverage
|
||||
/phpunit.phar
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Symfony\CS\FixerInterface;
|
||||
|
||||
$finder = Symfony\CS\Finder\DefaultFinder::create()
|
||||
->notName('LICENSE')
|
||||
->notName('README.md')
|
||||
->notName('.php_cs')
|
||||
->notName('composer.*')
|
||||
->notName('phpunit.xml*')
|
||||
->notName('*.phar')
|
||||
->exclude('vendor')
|
||||
->exclude('examples')
|
||||
->exclude('Symfony/CS/Tests/Fixer')
|
||||
->notName('ElseifFixer.php')
|
||||
->exclude('data')
|
||||
->in(__DIR__)
|
||||
;
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
->finder($finder)
|
||||
;
|
||||
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
language: php
|
||||
php:
|
||||
- "5.2"
|
||||
- "5.3"
|
||||
- "5.4"
|
||||
- "5.5"
|
||||
- "5.6"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- devel
|
||||
|
||||
script:
|
||||
- phpunit -v -c tests/phpunit.xml
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,45 +1,63 @@
|
||||
[](https://travis-ci.org/serbanghita/Mobile-Detect) [](https://packagist.org/packages/mobiledetect/mobiledetectlib) [](https://packagist.org/packages/mobiledetect/mobiledetectlib) [](https://packagist.org/packages/mobiledetect/mobiledetectlib) [](https://packagist.org/packages/mobiledetect/mobiledetectlib)
|
||||
[](https://gitter.im/serbanghita/Mobile-Detect?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||

|
||||
|
||||
> Motto: "Every business should have a mobile detection script to detect mobile readers."
|
||||
> Motto: "Every business should have a detection script to detect mobile readers."
|
||||
|
||||
*Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets).
|
||||
It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.*
|
||||
[](https://travis-ci.org/serbanghita/Mobile-Detect)
|
||||
[](https://packagist.org/packages/mobiledetect/mobiledetectlib)
|
||||
[](https://packagist.org/packages/mobiledetect/mobiledetectlib)
|
||||
[](https://packagist.org/packages/mobiledetect/mobiledetectlib)
|
||||
[](https://packagist.org/packages/mobiledetect/mobiledetectlib)
|
||||
[](https://join.slack.com/t/mobiledetect/shared_invite/enQtMjg1NDY0OTg5NzgzLTcwMzEzMWJjZjRlOWFkY2ZiNzE1ZmRmNzEwM2VhOGY5OGVkYWMxNjdkZDU5YjQ5MmM5MGUxYjhlZDQwOGVjZjE)
|
||||
|
||||
#### About
|
||||
|
||||
Mobile Detect is a lightweight PHP class for detecting mobile devices (including tablets).
|
||||
It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
|
||||
|
||||
*Why*
|
||||
|
||||
Your website's _content strategy_ is important! You need a complete toolkit to deliver an experience that is _optimized_,
|
||||
_fast_ and _relevant_ to your users. Mobile Detect class is a
|
||||
[server-side detection](http://www.w3.org/TR/mwabp/#bp-devcap-detection) tool that can help you with your RWD strategy,
|
||||
it is not a replacement for CSS3 media queries or other forms of client-side feature detection.
|
||||
|
||||
*How*
|
||||
|
||||
We're committed to make Mobile_Detect the best open-source mobile detection resource and this is why before
|
||||
each release we're running [unit tests](./tests), we also research and update the detection rules on **daily**
|
||||
and **weekly** basis.
|
||||
each release we're running [unit tests](./tests) and research and update the detection rules on **monthly** basis.
|
||||
|
||||
Your website's _content strategy_ is important! You need a complete toolkit to deliver an experience that is _optimized_, _fast_ and _relevant_ to your users. Mobile_Detect class is a [server-side detection](http://www.w3.org/TR/mwabp/#bp-devcap-detection) tool that can help you with your RWD strategy, it is not a replacement for CSS3 media queries or other forms of client-side feature detection.
|
||||
*Who*
|
||||
|
||||
##### This month updates
|
||||
See [the history](./docs/HISTORY.md) of the project.
|
||||
|
||||
**THANK YOU** for your continuous support and feedback!
|
||||
#### Announcements
|
||||
|
||||
Still working on `3.0.0` branch to provide you with device detection! We're really excited on this one!
|
||||
We would like to speed this up, but life and family gets in the way ;)
|
||||
* **JetBrains** is sponsoring the project by providing licenses for [PHPStorm](https://www.jetbrains.com/phpstorm/) and
|
||||
[DataGrip](https://www.jetbrains.com/datagrip/).
|
||||
* **Mobile_Detect `2.x.x`** is only integrating new regexes, User-Agents and tests. We are focusing on **new tablets only**.
|
||||
The rest of the PRs about TVs, bots or optimizations will be closed and analyzed after `3.0.0-beta` is released.
|
||||
* **Mobile_Detect `3.x.x`** is experimental and WIP.
|
||||
|
||||
Special thanks to **JetBrains** for providing licenses for **PHPStorm**. In case you never heard or tried PHPStorm, you're
|
||||
clearly missing out! [Check PHPStorm](https://www.jetbrains.com/phpstorm/) out!
|
||||
|
||||
##### Download and demo
|
||||
#### Install
|
||||
|
||||
|Download|Docs|Examples|
|
||||
|-------------|-------------|-------------|
|
||||
|[Go to releases](../../tags)|[Become a contributor](../../wiki/Become-a-contributor)|[Code examples](../../wiki/Code-examples)
|
||||
|[Mobile_Detect.php](./Mobile_Detect.php)|[History](../../wiki/History)|[:iphone: Live demo!](http://is.gd/mobiletest)
|
||||
|[Composer package](https://packagist.org/packages/mobiledetect/mobiledetectlib)|
|
||||
**Download and include manually**
|
||||
> Use this to quickly test the demo.
|
||||
|
||||
#### Continuous updates
|
||||
* [Download latest release](../../tags)
|
||||
* [Mobile_Detect.php](./Mobile_Detect.php)
|
||||
|
||||
You can use [composer](https://getcomposer.org/doc/00-intro.md) in your release and update process to make sure you have the latest Mobile_Detect version.
|
||||
```php
|
||||
require_once "libs/Mobile_Detect.php";
|
||||
```
|
||||
|
||||
**Install as a [composer package](https://packagist.org/packages/mobiledetect/mobiledetectlib)**
|
||||
> Use this method to get continuous updates.
|
||||
|
||||
```
|
||||
composer require mobiledetect/mobiledetectlib
|
||||
```
|
||||
|
||||
or include the dependency in the `composer.json` file:
|
||||
```json
|
||||
{
|
||||
"require": {
|
||||
@ -48,208 +66,279 @@ composer require mobiledetect/mobiledetectlib
|
||||
}
|
||||
```
|
||||
|
||||
##### Help
|
||||
#### Demo
|
||||
|
||||
|Pledgie|Paypal|
|
||||
|-------|------|
|
||||
|[Donate :+1:](http://pledgie.com/campaigns/21856)|[Donate :beer:](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mobiledetectlib%40gmail%2ecom&lc=US&item_name=Mobile%20Detect¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)|
|
||||
* [:iphone: Live demo!](http://is.gd/mobiletest)
|
||||
* [Code examples](../../wiki/Code-examples)
|
||||
|
||||
#### Contribute
|
||||
|
||||
*Submit a PR*
|
||||
> Submit a pull request but before make sure you read [how to contribute](../../docs/CONTRIBUTING.md) guide.
|
||||
|
||||
*Donate*
|
||||
|
||||
|Paypal|
|
||||
|------|
|
||||
|[Donate :+1:](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mobiledetectlib%40gmail%2ecom&lc=US&item_name=Mobile%20Detect¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)|
|
||||
|
||||
|
||||
I'm currently paying for hosting and spend a lot of my family time to maintain the project and planning the future releases.
|
||||
I would highly appreciate any money donations that will keep the research going.
|
||||
|
||||
Special thanks to the community :+1: for donations, [BrowserStack](http://browserstack.com) - for providing access to their great platform, [Zend](http://zend.com) - for donating licenses, [Dragos Gavrila](https://twitter.com/grafician) who contributed with the logo.
|
||||
Special thanks to the community :+1: for donations, JetBrains team for the continuous support and [Dragos Gavrila](https://twitter.com/grafician) who contributed with the logo.
|
||||
|
||||
##### 3rd party modules / [Submit new](../../issues/new?title=New%203rd%20party%20module&body=Name, Link and Description of the module.)
|
||||
#### Modules, plugins, ports
|
||||
> [Submit new module, plugin, port](../../issues/new?title=New%203rd%20party%20module&body=Name,%20Link%20and%20Description%20of%20the%20module.)
|
||||
|
||||
:point_right: Keep `Mobile_Detect.php` class in a separate `module` and do NOT include it in your script core because of the high frequency of updates.
|
||||
:point_right: When including the class into you `web application` or `module` always use `include_once '../path/to/Mobile_Detect.php` to prevent conflicts.
|
||||
|
||||
<table>
|
||||
**JavaScript**
|
||||
|
||||
<tr>
|
||||
<td>Varnish Cache</td>
|
||||
<td>
|
||||
<p><a href="https://github.com/willemk/varnish-mobiletranslate">Varnish Mobile Detect</a> - Drop-in varnish solution to mobile user detection based on the Mobile-Detect library. Made by <a href="https://github.com/willemk">willemk</a></p>
|
||||
<p><a href="https://github.com/carlosabalde/mobiledetect2vcl">mobiledetect2vcl</a> - Python script to transform the Mobile Detect JSON database into an UA-based mobile detection VCL subroutine easily integrable in any Varnish Cache configuration. Made by <a href="https://github.com/carlosabalde">Carlos Abalde</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
* mobile-detect.js - A [JavaScript port](https://github.com/hgoebl/mobile-detect.js) of Mobile-Detect class. Made by [Heinrich Goebl](https://github.com/hgoebl).
|
||||
|
||||
<tr>
|
||||
<td>WordPress</td>
|
||||
<td>
|
||||
<p><a href="http://wordpress.org/extend/plugins/wp-mobile-detect/">WordPress Mobile Detect</a> - Gives you the ability to wrap that infographic in a <code>[notdevice][/notdevice]</code> shortcode so at the server level <code>WordPress</code> will decide to show that content only if the user is NOT on a phone or tablet. Made by <a href="http://profiles.wordpress.org/professor44/">Jesse Friedman</a>.</p>
|
||||
**Varnish Cache**
|
||||
|
||||
<p><a href="http://wordpress.org/plugins/mobble/">mobble</a> - provides mobile related conditional functions for your site. e.g. is_iphone(), is_mobile() and is_tablet(). Made by Scott Evans.</p>
|
||||
* [Varnish Mobile Detect](https://github.com/willemk/varnish-mobiletranslate) - Drop-in varnish solution to mobile user
|
||||
detection based on the Mobile-Detect library. Made by [willemk](https://github.com/willemk).
|
||||
* [mobiledetect2vcl](https://github.com/carlosabalde/mobiledetect2vcl) - Python script to transform the Mobile
|
||||
Detect JSON database into an UA-based mobile detection VCL subroutine easily integrable in any Varnish Cache
|
||||
configuration. Made by [Carlos Abalde](https://github.com/carlosabalde).
|
||||
|
||||
<p><a href="https://github.com/iamspacehead/responsage">WordPress Responsage</a> - A small <code>WordPress</code> theme plugin that allows you to make your images responsive. Made by <a href="https://github.com/iamspacehead">Adrian Ciaschetti</a>.</p>
|
||||
**LUA**
|
||||
|
||||
* [mobile-detect.lua](https://github.com/yourpalmark/mobile-detect.lua) is a port of Mobile-Detect to Lua for
|
||||
NGINX HTTP servers. Follows closely to mobile-detect.js. Supports all methods that server-side
|
||||
mobile-detect.js supports. Fully unit-tested and synced with Travis CI (Build Passing badge included).
|
||||
Made by [Mark Walters](https://github.com/yourpalmark).
|
||||
|
||||
**PHP**
|
||||
|
||||
**WordPress**
|
||||
|
||||
* [Mobile Detect for WordPress](https://wordpress.org/plugins/tinywp-mobile-detect/) - WordPress has a built-in function
|
||||
(`wp_is_mobile()`) to detect mobile devices. There is (at least) one catch, though. It considers iPad (iPad pro,
|
||||
and any tablet) as a mobile. So, this 3rd party module changes the way `wp_is_mobile()` works with the help of
|
||||
Mobile Detect PHP library!
|
||||
Made by [Pothi Kalimuthu](https://github.com/pothi)
|
||||
|
||||
* [WordPress Mobile Detect](https://wordpress.org/plugins/wp-mobile-detect/) - Gives you the ability to wrap that
|
||||
infographic in a `[notdevice][/notdevice]` shortcode so at the server level WordPress will
|
||||
decide to show that content only if the user is NOT on a phone or tablet.
|
||||
Made by [Jesse Friedman](https://profiles.wordpress.org/professor44/).
|
||||
|
||||
* [mobble](https://wordpress.org/plugins/mobble/) - provides mobile related conditional functions for your site.
|
||||
e.g. `is_iphone()`, `is_mobile()` and `is_tablet()`. Made by Scott Evans.
|
||||
|
||||
* [WordPress Responsage](https://github.com/iamspacehead/responsage) - A small WordPress theme plugin that allows
|
||||
you to make your images responsive. Made by [Adrian Ciaschetti](https://github.com/iamspacehead).
|
||||
|
||||
<p><a href="https://wordpress.org/plugins/wp247-body-classes/">WP247 Body Classes</a> - Add unique classes to the <code>body</code> tag for easy styling based on various attributes (archive, user, post, mobile) and various WordPress "is" functions. Mobile attributes include type of device, Operating System, Browser, etc. Examples: .is-mobile, .is-not-mobile, .is-tablet, .is-ios, .is-not-ios, .is-androidos, .is-chromebrowser. Made by <a href="https://github.com/wescleveland56">wescleveland56</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
* [WP247 Body Classes](https://wordpress.org/plugins/wp247-body-classes/) - Add unique classes to the `body` tag for
|
||||
easy styling based on various attributes (archive, user, post, mobile) and various WordPress "is" functions.
|
||||
Mobile attributes include type of device, Operating System, Browser, etc. Examples: .is-mobile, .is-not-mobile,
|
||||
.is-tablet, .is-ios, .is-not-ios, .is-androidos, .is-chromebrowser.
|
||||
Made by [wescleveland56](https://github.com/wescleveland56).
|
||||
|
||||
<tr>
|
||||
<td>Drupal</td>
|
||||
<td>
|
||||
<p><a href="http://drupal.org/project/mobile_switch">Drupal Mobile Switch</a> - The Mobile Switch <code>Drupal</code> module provides a automatic theme switch functionality for mobile devices,
|
||||
detected by Browscap or Mobile Detect. Made by <a href="http://drupal.org/user/45267">Siegfried Neumann</a>.</p>
|
||||
* [Adaptive Content](https://wordpress.org/plugins/addfunc-adaptive-content/) for WordPress provides the most
|
||||
intuitive set of shortcodes for including/excluding content on mobile devices, tablets desktops and other
|
||||
more specific device parameters. This lightweight plugin lets content writers and theme authors choose when
|
||||
WordPress should or shouldn’t show any give content item using shortcodes and quicktags or theme elements using functions.
|
||||
Made by [AddFunc](https://profiles.wordpress.org/addfunc).
|
||||
|
||||
<p><a href="http://drupal.org/project/context_mobile_detect">Drupal Context Mobile Detect</a> - This is a <code>Drupal context</code> module which integrates Context and PHP Mobile Detect library.
|
||||
Created by <a href="http://drupal.org/user/432492">Artem Shymko</a>.</p>
|
||||
* [AddFunc Mobile Detect](https://wordpress.org/plugins/addfunc-mobile-detect/) for WordPress redirects
|
||||
mobile traffic to your mobile website and, basically, gives you loads of control over your mobile redirects.
|
||||
Made by [AddFunc](https://profiles.wordpress.org/addfunc).
|
||||
|
||||
<p><a href="http://drupal.org/project/mobile_detect">Drupal Mobile Detect</a> - Lightweight mobile detect module for <code>Drupal</code> created by <a href="http://drupal.org/user/325244">Matthew Donadio</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
**Drupal**
|
||||
|
||||
<tr>
|
||||
<td>Joomla</td>
|
||||
<td>
|
||||
<p><a href="http://www.yagendoo.com/en/blog/free-mobile-detection-plugin-for-joomla.html">yagendoo Joomla! Mobile Detection Plugin</a> - Lightweight PHP plugin for Joomla!
|
||||
that detects a mobile browser using the Mobile Detect class. Made by <a href="http://www.yagendoo.com/">yagendoo media</a>.</p>
|
||||
|
||||
<p><a href="https://github.com/renekreijveld/UserAgentDetector">User Agent Detector plugin</a> by @ReneKreijveld. This system plugin detects the user agent of your
|
||||
website visitor and sets a session variable accordingly. Based on the user agent, the plugin detects if the site is running on a desktop pc, tablet or smartphone.
|
||||
It can also detect if the visitor is a spider bot (search engine). Session variable that is set: ualayout. Possible values: desktop, tablet, mobile, bot..</p>
|
||||
</td>
|
||||
</tr>
|
||||
* [Drupal Mobile Switch](https://www.drupal.org/project/mobile_switch) - The Mobile Switch Drupal module provides a
|
||||
automatic theme switch functionality for mobile devices, detected by Browscap or Mobile Detect.
|
||||
Made by [Siegfried Neumann](https://www.drupal.org/user/45267).
|
||||
|
||||
<tr>
|
||||
<td>Magento</td>
|
||||
<td><p><a href="http://www.magentocommerce.com/magento-connect/catalog/product/view/id/16835/">Magento</a> - This <code>Magento helper</code> from Optimise Web enables the use of all functions provided by MobileDetect.net.
|
||||
Made by <a href="http://www.kathirvel.com">Kathir Vel</a>.</p></td>
|
||||
</tr>
|
||||
* [Drupal Context Mobile Detect](https://www.drupal.org/project/context_mobile_detect) - This is a Drupal context module
|
||||
which integrates Context and PHP Mobile Detect library.
|
||||
Created by [Artem Shymko](https://www.drupal.org/user/432492).
|
||||
|
||||
<tr>
|
||||
<td>PrestaShop</td>
|
||||
<td><p><a href="http://www.prestashop.com/">PrestaShop</a> is a free, secure and open source shopping cart platform. Mobile_Detect is included in the default package since 1.5.x.</p></td>
|
||||
</tr>
|
||||
* [Drupal Mobile Detect](https://www.drupal.org/project/mobile_detect) - Lightweight mobile detect module for Drupal
|
||||
created by [Matthew Donadio](https://www.drupal.org/user/325244).
|
||||
|
||||
<tr>
|
||||
<td>Zend Framework</td>
|
||||
<td>
|
||||
<p><a href="https://github.com/neilime/zf2-mobile-detect.git">ZF2 Mobile-Detect</a> - Zend Framework 2 module that provides Mobile-Detect features (Mobile_Detect class as a service, helper for views and plugin controllers). Made by <a href="https://github.com/neilime">neilime</a></p>
|
||||
**Joomla**
|
||||
|
||||
<p><a href="https://github.com/nikolaposa/MobileDetectModule">ZF2 MobileDetectModule</a> - Facilitates integration of a PHP MobileDetect class with some ZF2-based application. Has similar idea like the existing ZF2 Mobile-Detect module, but differs in initialization and provision routine of the actual Mobile_Detect class. Appropriate view helper and controller plugin also have different conceptions. Made by <a href="https://github.com/nikolaposa">Nikola Posa</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Symfony</td>
|
||||
<td><p><a href="https://github.com/suncat2000/MobileDetectBundle">Symfony2 Mobile Detect Bundle</a> - The bundle for detecting mobile devices, manage mobile view and redirect to the mobile and tablet version.
|
||||
Made by <a href="https://github.com/suncat2000">Nikolay Ivlev</a>.</p>
|
||||
<p><a href="https://github.com/jbinfo/MobileDetectServiceProvider">Silex Mobile Detect Service Provider</a> - <code>Silex</code> service provider to interact with Mobile detect class methods. Made by <a href="https://github.com/jbinfo">Lhassan Baazzi</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Laravel</td>
|
||||
<td>
|
||||
<p><a href="https://github.com/jenssegers/Laravel-Agent">Laravel-Agent</a> a user agent class for Laravel, based on Mobile Detect with some additional functionality. Made by <a href="https://github.com/jenssegers">Jens Segers</a>.</p>
|
||||
<p><a href="https://github.com/hisorange/browser-detect">BrowserDetect</a> is a browser & mobile detection package, collects and wrap together the best user-agent identifiers for Laravel. Created by <a href="https://github.com/hisorange">Varga Zsolt</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>ExpressionEngine</td>
|
||||
<td><p><a href="https://github.com/garethtdavies/detect-mobile">EE2 Detect Mobile</a> - Lightweight PHP plugin for <code>EE2</code> that detects a mobile browser using the Mobile Detect class. Made by <a href="https://github.com/garethtdavies">Gareth Davies</a>.</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Yii Framework</td>
|
||||
<td>
|
||||
<p><a href="https://github.com/iamsalnikov/MobileDetect">Yii Extension</a> - Mobile detect plugin for Yii framework.
|
||||
Made by <a href="https://github.com/iamsalnikov">Alexey Salnikov</a>.</p>
|
||||
|
||||
<p><a href="https://github.com/alexandernst/yii2-device-detect/">Yii2 Device Detect</a> - Yii2 extension for Mobile-Detect library. Made by <a href="https://github.com/alexandernst">Alexander Nestorov</a></p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>CakePHP</td>
|
||||
<td><p><a href="https://github.com/chronon/CakePHP-MobileDetectComponent-Plugin">CakePHP MobileDetect</a> - <code>plugin</code> component for <code>CakePHP</code> 2.x. Made by <a href="https://github.com/chronon">Gregory Gaskill</a></p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>FuelPHP</td>
|
||||
<td><a href="https://github.com/rob-bar/special_agent">Special Agent</a> is a FuelPHP package which uses php-mobile-detect to determine whether a device is mobile or not.
|
||||
It overrides the Fuelphp Agent class its methods. Made by <a href="https://github.com/rob-bar">Robbie Bardjin</a>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Typo3</td>
|
||||
<td><a href="http://docs.typo3.org/typo3cms/extensions/px_mobiledetect/1.0.2/">px_mobiledetect</a> is an extension that helps to detect visitor's mobile device class (if that’s tablet or mobile device like smartphone). Made by Alexander Tretyak.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Statamic</td>
|
||||
<td><p><a href="https://github.com/haikulab/statamic-mobile-detect">Statamic CMS Mobile Detect</a> - <code>plugin</code>. Made by <a href="https://github.com/haikulab/statamic-mobile-detect">Sergei Filippov of Haiku Lab</a>.</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Kohana</td>
|
||||
<td><p><a href="https://github.com/madeinnordeste/kohana-mobile-detect">Kohana Mobile Detect</a> - an example of implementation of <code>Mobile_Detect</code> class with Kohana framework. Written by <a href="https://github.com/madeinnordeste">Luiz Alberto S. Ribeiro</a>.</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>mobile-detect.js</td>
|
||||
<td><p>A <a href="https://github.com/hgoebl/mobile-detect.js">JavaScript port</a> of Mobile-Detect class. Made by <a href="https://github.com/hgoebl">Heinrich Goebl</a></p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Perl</td>
|
||||
<td><p><a href="http://www.buzzerstar.com/development/">MobileDetect.pm</a> - <code>Perl module</code> for Mobile Detect. Made by <a href="http://www.buzzerstar.com/">Sebastian Enger</a>.</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>python</td>
|
||||
<td><p><a href="http://pypi.python.org/pypi/pymobiledetect">pymobiledetect</a> - Mobile detect <code>python package</code>. Made by Bas van Oostveen.</p></td>
|
||||
</tr>
|
||||
* [yagendoo Joomla! Mobile Detection Plugin](http://www.yagendoo.com/en/blog/free-mobile-detection-plugin-for-joomla.html) - Lightweight PHP plugin for Joomla!
|
||||
that detects a mobile browser using the Mobile Detect class.
|
||||
Made by yagendoo media.
|
||||
|
||||
<tr>
|
||||
<td>Ruby</td>
|
||||
<td><p><a href="https://github.com/ktaragorn/mobile_detect">mobile_detect.rb</a> - A <code>Ruby gem</code> using the JSON data exposed by the php project and implementing a basic subset of the API (as much as can be done by the exposed data). Made by <a href="https://github.com/ktaragorn">Karthik T</a>.</p></td>
|
||||
</tr>
|
||||
* [User Agent Detector plugin](https://github.com/renekreijveld/UserAgentDetector) - This system plugin detects the user
|
||||
agent of your website visitor and sets a session variable accordingly. Based on the user agent, the plugin detects if the
|
||||
site is running on a desktop pc, tablet or smartphone. It can also detect if the visitor is a spider bot (search engine).
|
||||
Session variable that is set: `ualayout`. Possible values: desktop, tablet, mobile, bot.
|
||||
Made by @ReneKreijveld.
|
||||
|
||||
<tr>
|
||||
<td>GoMobileDetect</td>
|
||||
<td><p><a href="https://github.com/Shaked/gomobiledetect">GoMobileDetect</a> - <code>Go</code> port of Mobile Detect class. Made by <a href="https://github.com/Shaked">Shaked</a>.</p></td>
|
||||
</tr>
|
||||
**Magento**
|
||||
|
||||
<tr>
|
||||
<td>LUA</td>
|
||||
<td><p><a href="https://github.com/robinef/ua-lua">ua-lua</a> is a small lib written in <code>LUA</code> providing device type detection. ua-lua is detecting mobile or tablet devices based on user-agent inside nginx daemon. Made by <a href="https://github.com/robinef">Frédéric Robinet</a>.</p></td>
|
||||
</tr>
|
||||
* [Magento helper](http://www.magentocommerce.com/magento-connect/catalog/product/view/id/16835/) from Optimise Web enables
|
||||
the use of all functions provided by Mobile Detect. Made by [Kathir Vel](http://www.kathirvel.com).
|
||||
|
||||
<tr>
|
||||
<td>MemHT</td>
|
||||
<td><p><a href="http://www.memht.com/">MemHT</a> is a Free PHP CMS and Blog that permit the creation and the management online of websites with few and easy steps. Has the class included in the core.</p></td>
|
||||
</tr>
|
||||
* [Magento 2 Mobile Detect Theme Change](https://github.com/EaDesgin/magento2-mobiledetect) is an extension for Magento 2
|
||||
that will change the theme or redirect to a different URL. Also containing a helper to check for the device type.
|
||||
|
||||
<tr>
|
||||
<td>concrete5</td>
|
||||
<td><p><a href="https://www.concrete5.org/">concrete5</a> is a CMS that is free and open source. The library is included in the core.</p></td>
|
||||
</tr>
|
||||
**PrestaShop**
|
||||
|
||||
<tr>
|
||||
<td>engine7</td>
|
||||
<td><p><a href="https://github.com/gchiappe/exengine7">ExEngine 7</a> PHP Open Source Framework. The Mobile_Detect class is included in the engine.</p></td>
|
||||
</tr>
|
||||
* [PrestaShop](https://www.prestashop.com) is a free, secure and open source shopping cart platform. Mobile_Detect
|
||||
is included in the default package since 1.5.x.
|
||||
|
||||
<tr>
|
||||
<td>Zikula</td>
|
||||
<td><p><a href="http://zikula.org/">Zikula</a> is a free and open-source Content Management Framework, which allows you to run impressive websites and build powerful online applications. The core uses Mobile-Detect to switch to a special Mobile theme, using jQueryMobile</p></td>
|
||||
</tr>
|
||||
**Laravel**
|
||||
|
||||
<tr>
|
||||
<td>UserAgentInfo</td>
|
||||
<td><p><a href="https://github.com/quentin389/UserAgentInfo">UserAgentInfo</a> is a PHP class for parsing user agent strings (HTTP_USER_AGENT). Includes mobile checks, bot checks, browser types/versions and more.
|
||||
Based on browscap, Mobile_Detect and ua-parser. Created for high traffic websites and fast batch processing. Made by <a href="https://github.com/quentin389">quentin389</a></p></td>
|
||||
</tr>
|
||||
* [Agent](https://github.com/jenssegers/agent) is a user agent class for Laravel based on Mobile Detect with some
|
||||
additional functionality.
|
||||
Made by [Jens Segers](https://github.com/jenssegers).
|
||||
|
||||
<tr>
|
||||
<td>Craft CMS</td>
|
||||
<td><p><a href="https://github.com/lewisjenkins/craft-lj-mobiledetect">LJ Mobile Detect</a> is a simple implementation of Mobile Detect for Craft CMS. Made by <a href="https://github.com/lewisjenkins">Lewis Jenkins</a></p></td>
|
||||
</tr>
|
||||
* [Laravel Mobile Detect](https://github.com/riverskies/laravel-mobile-detect) is a package that enables you to use device detection right in your Laravel Blade templates. (Utilises the well-known, constantly updated PHP mobile detection library.)
|
||||
Made by [Barnabas Kecskes](https://github.com/barnabaskecskes).
|
||||
|
||||
</table>
|
||||
* [BrowserDetect](https://github.com/hisorange/browser-detect) is a browser and mobile detection package, collects
|
||||
and wrap together the best user-agent identifiers for Laravel.
|
||||
Created by [Varga Zsolt](https://github.com/hisorange).
|
||||
|
||||
**Zend Framework**
|
||||
|
||||
* [ZF2 Mobile-Detect](https://github.com/neilime/zf2-mobile-detect.git) is a Zend Framework 2 module that provides
|
||||
Mobile-Detect features (Mobile_Detect class as a service, helper for views and plugin controllers).
|
||||
Made by [neilime](https://github.com/neilime).
|
||||
|
||||
* [ZF2 MobileDetectModule](https://github.com/nikolaposa/MobileDetectModule) facilitates integration of a PHP MobileDetect
|
||||
class with some ZF2-based application. Has similar idea like the existing ZF2 Mobile-Detect module,
|
||||
but differs in initialization and provision routine of the actual Mobile_Detect class.
|
||||
Appropriate view helper and controller plugin also have different conceptions.
|
||||
Made by [Nikola Posa](https://github.com/nikolaposa).
|
||||
|
||||
**Symfony**
|
||||
|
||||
* [Symfony2 Mobile Detect Bundle](https://github.com/suncat2000/MobileDetectBundle) is a bundle for detecting mobile devices,
|
||||
manage mobile view and redirect to the mobile and tablet version.
|
||||
Made by [Nikolay Ivlev](https://github.com/suncat2000).
|
||||
|
||||
* [Silex Mobile Detect Service Provider](https://github.com/jbinfo/MobileDetectServiceProvider) is a service provider to
|
||||
interact with Mobile detect class methods.
|
||||
Made by [Lhassan Baazzi](https://github.com/jbinfo).
|
||||
|
||||
**Slim Framework**
|
||||
|
||||
* [Slim_Mobile_Detect](https://github.com/zguillez/slim_mobile_detect) implements Mobile_Detect lib for different
|
||||
responses write on Slim Framework App.
|
||||
|
||||
**ExpressionEngine**
|
||||
|
||||
* [EE2 Detect Mobile](https://github.com/garethtdavies/detect-mobile) is a lightweight PHP plugin for EE2 that detects
|
||||
a mobile browser using the Mobile Detect class. Made by [Gareth Davies](https://github.com/garethtdavies).
|
||||
|
||||
**Yii Framework**
|
||||
|
||||
* [Yii Extension](https://github.com/iamsalnikov/MobileDetect) - Mobile detect plugin for Yii framework.
|
||||
Made by [Alexey Salnikov](https://github.com/iamsalnikov).
|
||||
|
||||
* [Yii Extension](https://github.com/candasm/yii1-mobile-detect-component) - Mobile detect component for Yii framework
|
||||
1.x version which supports composer package manager. Made by [Candas Minareci](https://github.com/candasm).
|
||||
|
||||
* [Yii2 Device Detect](https://github.com/alexandernst/yii2-device-detect/) - Yii2 extension for Mobile-Detect library.
|
||||
Made by [Alexander Nestorov](https://github.com/alexandernst).
|
||||
|
||||
**CakePHP**
|
||||
|
||||
* [CakePHP MobileDetect](https://github.com/chronon/CakePHP-MobileDetectComponent-Plugin) is a plugin component for
|
||||
CakePHP 2.x. Made by [Gregory Gaskill](https://github.com/chronon).
|
||||
|
||||
**FuelPHP**
|
||||
|
||||
* [Special Agent](https://github.com/rob-bar/special_agent) is a FuelPHP package which uses php-mobile-detect to
|
||||
determine whether a device is mobile or not. It overrides the Fuelphp Agent class its methods.
|
||||
Made by [Robbie Bardjin](https://github.com/rob-bar).
|
||||
|
||||
|
||||
**TYPO3**
|
||||
|
||||
* [px_mobiledetect](https://typo3.org/extensions/repository/view/px_mobiledetect) is an extension that helps to detect
|
||||
visitor's mobile device class (if that’s tablet or mobile device like smartphone). Made by Alexander Tretyak.
|
||||
|
||||
**Other**
|
||||
|
||||
* [PageCache](https://github.com/mmamedov/page-cache) is a lightweight PHP library for full page cache,
|
||||
with built-in Mobile-Detect support. Made by [Muhammed Mamedov](https://github.com/mmamedov).
|
||||
|
||||
* [Statamic CMS Mobile Detect](https://github.com/haikulab/statamic-mobile-detect) is a plugin.
|
||||
Made by [Sergei Filippov](https://github.com/haikulab/statamic-mobile-detect) of Haiku Lab.
|
||||
|
||||
* [Kohana Mobile Detect](https://github.com/madeinnordeste/kohana-mobile-detect) is an example of implementation of
|
||||
Mobile_Detect class with Kohana framework.
|
||||
Written by [Luiz Alberto S. Ribeiro](https://github.com/madeinnordeste).
|
||||
|
||||
* [MemHT](https://www.memht.com) is a Free PHP CMS and Blog that permit the creation and the management online
|
||||
of websites with few and easy steps. Has the class included in the core.
|
||||
|
||||
* [concrete5](https://www.concrete5.org) is a CMS that is free and open source. The library is included in the core.
|
||||
|
||||
* [engine7](https://github.com/QOXCorp/exengine) is PHP Open Source Framework. The Mobile_Detect class is included in
|
||||
the engine.
|
||||
|
||||
* [Zikula](http://zikula.org) is a free and open-source Content Management Framework, which allows you to run
|
||||
impressive websites and build powerful online applications. The core uses Mobile-Detect to switch to a special
|
||||
Mobile theme, using jQueryMobile.
|
||||
|
||||
* [UserAgentInfo](https://github.com/quentin389/UserAgentInfo) is a PHP class for parsing user agent strings
|
||||
(HTTP_USER_AGENT). Includes mobile checks, bot checks, browser types/versions and more.
|
||||
Based on browscap, Mobile_Detect and ua-parser. Created for high traffic websites and fast batch processing.
|
||||
Made by [quentin389](https://github.com/quentin389).
|
||||
|
||||
* [LJ Mobile Detect](https://github.com/lewisjenkins/craft-lj-mobiledetect) is a simple implementation of Mobile Detect
|
||||
for Craft CMS. Made by [Lewis Jenkins](https://github.com/lewisjenkins).
|
||||
|
||||
* [Detect Craft](https://github.com/mmikkel/Detect-Craft) is a Craft CMS wrapper for the Mobile_Detect library. Made by [Mikkel Rummelhoff](https://github.com/mmikkel).
|
||||
|
||||
* [Grav Plugin Mobile Detect](https://github.com/dimitrilongo/grav-plugin-mobile-detect/) is a simple implementation
|
||||
of Mobile Detect for Grav CMS. Made by [Dimitri Longo](https://github.com/dimitrilongo).
|
||||
|
||||
* [Mobile_Detect module for UliCMS](https://github.com/derUli/ulicms-Mobile_Detect).
|
||||
Made by [derUli](https://github.com/derUli).
|
||||
|
||||
**Perl**
|
||||
|
||||
* [MobileDetect.pm](https://www.buzzerstar.com/development/) is a Perl module for Mobile Detect.
|
||||
Made by [Sebastian Enger](https://devop.tools/).
|
||||
|
||||
**Python**
|
||||
|
||||
* [pymobiledetect](https://pypi.python.org/pypi/pymobiledetect) - Mobile detect python package.
|
||||
Made by Bas van Oostveen.
|
||||
|
||||
**Ruby**
|
||||
|
||||
* [mobile_detect.rb](https://github.com/ktaragorn/mobile_detect) is a Ruby gem using the JSON data exposed by the
|
||||
php project and implementing a basic subset of the API (as much as can be done by the exposed data).
|
||||
Made by [Karthik T](https://github.com/ktaragorn).
|
||||
|
||||
**Go**
|
||||
|
||||
* [GoMobileDetect](https://github.com/Shaked/gomobiledetect) is a Go port of Mobile Detect class.
|
||||
Made by [https://github.com/Shaked](Shaked).
|
||||
|
||||
|
||||
**LUA**
|
||||
|
||||
* [ua-lua](https://github.com/robinef/ua-lua) is a small lib written in LUA providing device type detection.
|
||||
ua-lua is detecting mobile or tablet devices based on user-agent inside nginx daemon.
|
||||
Made by [Frédéric Robinet](https://github.com/robinef).
|
||||
|
||||
**.Net**
|
||||
|
||||
* [mobile-detect](https://github.com/validide/mobile-detect) is a .Net partial port written in C#.
|
||||
Made by [Valentin Dide](https://github.com/validide).
|
||||
|
||||
**ColdFusion**
|
||||
|
||||
* [MobileDetect](https://github.com/GiancarloGomez/ColdFusion-MobileDetect) is a CFC port of the
|
||||
Mobile_Detect PHP Library. Made by [Giancarlo Gomez](https://github.com/GiancarloGomez).
|
||||
|
||||
**Experiments** :bulb:
|
||||
|
||||
* [Mobile Detect Fast](https://bitbucket.org/lanaguani/mobile-detect-fast/) (See: [#474](https://github.com/serbanghita/Mobile-Detect/issues/474)) is a class to increase the performance of Mobile Detect lib. Made by [LanaGuani](https://github.com/lanaguanifw).
|
||||
|
||||
@ -17,14 +17,15 @@
|
||||
"php": ">=5.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "*",
|
||||
"johnkary/phpunit-speedtrap": "~1.0@dev",
|
||||
"codeclimate/php-test-reporter": "dev-master"
|
||||
"phpunit/phpunit": "~4.8.35||~5.7"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": ["Mobile_Detect.php"],
|
||||
"psr-0": {
|
||||
"Detection": "namespaced/"
|
||||
}
|
||||
},
|
||||
"archive": {
|
||||
"exclude": ["docs", "examples", "export"]
|
||||
}
|
||||
}
|
||||
|
||||
983
htdocs/includes/mobiledetect/mobiledetectlib/composer.lock
generated
Normal file
983
htdocs/includes/mobiledetect/mobiledetectlib/composer.lock
generated
Normal file
@ -0,0 +1,983 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "4a5fd4cd7cc7247a6df7411b031d4845",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
|
||||
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3,<8.0-DEV"
|
||||
},
|
||||
"require-dev": {
|
||||
"athletic/athletic": "~0.1.8",
|
||||
"ext-pdo": "*",
|
||||
"ext-phar": "*",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"squizlabs/php_codesniffer": "~2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Marco Pivetta",
|
||||
"email": "ocramius@gmail.com",
|
||||
"homepage": "http://ocramius.github.com/"
|
||||
}
|
||||
],
|
||||
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
||||
"homepage": "https://github.com/doctrine/instantiator",
|
||||
"keywords": [
|
||||
"constructor",
|
||||
"instantiate"
|
||||
],
|
||||
"time": "2015-06-14T21:17:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "2.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
|
||||
"reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"dflydev/markdown": "~1.0",
|
||||
"erusev/parsedown": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"phpDocumentor": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mike van Riel",
|
||||
"email": "mike.vanriel@naenius.com"
|
||||
}
|
||||
],
|
||||
"time": "2016-01-25T08:17:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.7.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
|
||||
"reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": "^5.3|^7.0",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
|
||||
"sebastian/comparator": "^1.1|^2.0",
|
||||
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^2.5|^3.2",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Prophecy\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Konstantin Kudryashov",
|
||||
"email": "ever.zet@gmail.com",
|
||||
"homepage": "http://everzet.com"
|
||||
},
|
||||
{
|
||||
"name": "Marcello Duarte",
|
||||
"email": "marcello.duarte@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
||||
"homepage": "https://github.com/phpspec/prophecy",
|
||||
"keywords": [
|
||||
"Double",
|
||||
"Dummy",
|
||||
"fake",
|
||||
"mock",
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2017-11-24T13:59:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "2.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
|
||||
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-file-iterator": "~1.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-token-stream": "~1.3",
|
||||
"sebastian/environment": "^1.3.2",
|
||||
"sebastian/version": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-xdebug": ">=2.1.4",
|
||||
"phpunit/phpunit": "~4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.2.1",
|
||||
"ext-xmlwriter": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
||||
"keywords": [
|
||||
"coverage",
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-10-06T15:47:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
"version": "1.4.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
|
||||
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
||||
"keywords": [
|
||||
"filesystem",
|
||||
"iterator"
|
||||
],
|
||||
"time": "2017-11-27T13:52:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
"version": "1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
||||
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
||||
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Simple template engine.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
||||
"keywords": [
|
||||
"template"
|
||||
],
|
||||
"time": "2015-06-21T13:50:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
"version": "1.0.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
|
||||
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.3 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Utility class for timing",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
||||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2017-02-26T11:10:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "1.4.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16",
|
||||
"reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Wrapper around PHP's tokenizer extension.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
||||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2017-12-04T08:55:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "4.8.36",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "46023de9a91eec7dfb06cc56cb4e260017298517"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517",
|
||||
"reference": "46023de9a91eec7dfb06cc56cb4e260017298517",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.3.3",
|
||||
"phpspec/prophecy": "^1.3.1",
|
||||
"phpunit/php-code-coverage": "~2.1",
|
||||
"phpunit/php-file-iterator": "~1.4",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-timer": "^1.0.6",
|
||||
"phpunit/phpunit-mock-objects": "~2.3",
|
||||
"sebastian/comparator": "~1.2.2",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/environment": "~1.3",
|
||||
"sebastian/exporter": "~1.2",
|
||||
"sebastian/global-state": "~1.0",
|
||||
"sebastian/version": "~1.0",
|
||||
"symfony/yaml": "~2.1|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"phpunit/php-invoker": "~1.1"
|
||||
},
|
||||
"bin": [
|
||||
"phpunit"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "The PHP Unit Testing framework.",
|
||||
"homepage": "https://phpunit.de/",
|
||||
"keywords": [
|
||||
"phpunit",
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2017-06-21T08:07:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
"version": "2.3.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
||||
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
|
||||
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"sebastian/exporter": "~1.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-soap": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Mock Object library for PHPUnit",
|
||||
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
|
||||
"keywords": [
|
||||
"mock",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-10-02T06:51:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
"version": "1.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
|
||||
"reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/exporter": "~1.2 || ~2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Volker Dusch",
|
||||
"email": "github@wallbash.com"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@2bepublished.at"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Provides the functionality to compare PHP values for equality",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/comparator",
|
||||
"keywords": [
|
||||
"comparator",
|
||||
"compare",
|
||||
"equality"
|
||||
],
|
||||
"time": "2017-01-29T09:50:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
"version": "1.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
|
||||
"reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.3 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kore Nordmann",
|
||||
"email": "mail@kore-nordmann.de"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Diff implementation",
|
||||
"homepage": "https://github.com/sebastianbergmann/diff",
|
||||
"keywords": [
|
||||
"diff"
|
||||
],
|
||||
"time": "2017-05-22T07:24:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "1.3.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
|
||||
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.3 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8 || ^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Provides functionality to handle HHVM/PHP environments",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/environment",
|
||||
"keywords": [
|
||||
"Xdebug",
|
||||
"environment",
|
||||
"hhvm"
|
||||
],
|
||||
"time": "2016-08-18T05:49:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
"version": "1.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
|
||||
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"sebastian/recursion-context": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-mbstring": "*",
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Volker Dusch",
|
||||
"email": "github@wallbash.com"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@2bepublished.at"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Adam Harvey",
|
||||
"email": "aharvey@php.net"
|
||||
}
|
||||
],
|
||||
"description": "Provides the functionality to export PHP variables for visualization",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
||||
"keywords": [
|
||||
"export",
|
||||
"exporter"
|
||||
],
|
||||
"time": "2016-06-17T09:04:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
|
||||
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-uopz": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Snapshotting of global state",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/global-state",
|
||||
"keywords": [
|
||||
"global state"
|
||||
],
|
||||
"time": "2015-10-12T03:26:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
||||
"reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
|
||||
"reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Adam Harvey",
|
||||
"email": "aharvey@php.net"
|
||||
}
|
||||
],
|
||||
"description": "Provides functionality to recursively process PHP variables",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
||||
"time": "2016-10-03T07:41:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
"version": "1.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/version.git",
|
||||
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
||||
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2015-06-21T13:59:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.8.32",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "968ef42161e4bc04200119da473077f9e7015128"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/968ef42161e4bc04200119da473077f9e7015128",
|
||||
"reference": "968ef42161e4bc04200119da473077f9e7015128",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.9"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.8-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Yaml\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-11-29T09:33:18+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.0.0"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
**Reporting issues**
|
||||
|
||||
1. Specify the User-agent by visiting [http://demo.mobiledetect.net](http://demo.mobiledetect.net).
|
||||
1. Specify the expected behaviour.
|
||||
|
||||
**Developing**
|
||||
|
||||
1. Fork Mobile Detect repository. See ["How to fork"](https://help.github.com/articles/fork-a-repo/#fork-an-example-repository) example.
|
||||
1. `git clone https://github.com/[yourname]/Mobile-Detect.git`
|
||||
1. `git add remote serbanghita https://github.com/serbanghita/Mobile-Detect.git`
|
||||
1. `git remote -v` - You should see:
|
||||
```
|
||||
origin git@github.com:serbanghita/Mobile-Detect.git
|
||||
serbanghita https://github.com/serbanghita/Mobile-Detect.git
|
||||
```
|
||||
1. `git checkout -b devel origin/devel`
|
||||
1. `composer install`
|
||||
1. Start working on your changes.
|
||||
1. If you add new methods or make structural changes to the `Mobile_Detect.php` class
|
||||
you need to add unit tests!
|
||||
1. If you add new regexes make sure you commit the User-Agents in [`tests/providers/vendors`](https://github.com/serbanghita/Mobile-Detect/tree/master/tests/providers/vendors)
|
||||
1. Run tests `vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-text --strict-coverage --stop-on-risky`
|
||||
1. `git status` or `git diff` - inspect your changes
|
||||
1 `git stage .`
|
||||
1. `git commit -m "[your commit message here]`
|
||||
1. `git push origin devel`
|
||||
1. Go to your repo on GitHub and ["Submit the PR"](https://help.github.com/articles/about-pull-requests/)
|
||||
|
||||
**New module, plugin, plugin or port**
|
||||
|
||||
[Submit new module, plugin, port](../../issues/new?title=New%203rd%20party%20module&body=Name,%20Link%20and%20Description%20of%20the%20module.)
|
||||
including the following information:
|
||||
* Module name
|
||||
* Description
|
||||
* Link
|
||||
* Author
|
||||
|
||||
Or you can submit a PR against `README.md`.
|
||||
|
||||
**Website updates**
|
||||
|
||||
1. Our official website is hosted at [http://mobiledetect.net](http://mobiledetect.net).
|
||||
1. The files are found on the `gh-pages` branch.
|
||||
1. `git checkout gh-pages`
|
||||
1. `npm install -g browser-sync`
|
||||
1. `browser-sync start --s . --f . --port 3000 --reload-debounce 1500 --no-ui`
|
||||
1. Go to `http://localhost:3000` and make changes.
|
||||
1. Commit, push and submit the PR against `serbanghita:gh-pages`.
|
||||
11
htdocs/includes/mobiledetect/mobiledetectlib/docs/HISTORY.md
Normal file
11
htdocs/includes/mobiledetect/mobiledetectlib/docs/HISTORY.md
Normal file
@ -0,0 +1,11 @@
|
||||
The first version of the script was developed in 2009 and it was hosted at https://code.google.com/p/php-mobile-detect/, it was a small project with around 30 stars. (Original blog post by Victor: http://victorstanciu.ro/detectarea-platformelor-mobile-in-php/)
|
||||
|
||||
In December 2011 it received a major update from the first version, an important number of issues were fixed, then 2.0 was launched. The new version marks a new mindset and also featuring tablet detection.
|
||||
|
||||
Throughout 2012 the script has been updated constantly and we have received tons of feedback and requests.
|
||||
|
||||
In July 2012 we moved the repository from Google Code to GitHub in order to quickly accommodate the frequent updates and to involve more people.
|
||||
|
||||
In August 2013 the library has 1800+ stargazers and support for: composer, PHPUnit tests, PSR standards and a new webpage http://mobiledetect.net
|
||||
|
||||
Mobile Detect library and user contributions are <a href="https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt">MIT Licensed</a>.
|
||||
@ -0,0 +1,15 @@
|
||||
-------------delete this message-------------
|
||||
* By submitting a new issue I acknowledge that I already read the README, CODE EXAMPLES and KNOWN LIMITATIONS.
|
||||
* I understand that the current version `2.x` is only meant to detect `mobile` devices.
|
||||
* Please post your User-Agent string! On a real device/s, the library is expected to work correctly.
|
||||
-------------delete this message-------------
|
||||
|
||||
|
||||
|
||||
**Issue description**
|
||||
|
||||
|
||||
**User-Agent(s)**
|
||||
|
||||
|
||||
**Suggestions**
|
||||
@ -0,0 +1,11 @@
|
||||
**Known limitations**
|
||||
|
||||
* Mobile Detect script was designed to detect `mobile` devices. Implicitly other devices are considered to be `desktop`.
|
||||
* User-Agent and HTTP headers sniffing is a non reliable method of detecting a mobile device.
|
||||
* If the mobile browser is set on `Desktop mode`, the Mobile Detect script has no way of knowing that the device is `mobile`.
|
||||
* Some touchscreen devices (eg. Microsoft Surface) are tough to detect as mobile since they can be used in a laptop mode.
|
||||
* Detecting the device brand (eg. Apple, Samsung, HTC) is not 100% reliable.
|
||||
* We don't monitor the quality of the 3rd party tools based on Mobile Detect script.
|
||||
We cannot guarantee that they are using the class properly or if they provide the latest version.
|
||||
* Version `2.x` is made to be PHP 5.3 compatible because of the backward compatibility changes of PHP.
|
||||
* There are hundreds of devices launched every month, we cannot keep a 100% up to date detection rate.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user